morffix/main.go
2024-04-25 21:53:01 +02:00

31 lines
411 B
Go

package main
import (
"log/slog"
"os"
"github.com/BurntSushi/toml"
)
type Config struct {
Server bool
}
var conf Config
func main() {
slog.Info("Starting...")
confPath := "config.toml"
_, err := os.Stat(confPath)
if err != nil {
confPath = "/etc/morffix/config.toml"
}
_, err = toml.DecodeFile(confPath, &conf)
if err != nil {
slog.Error("Error Loading Config", "err", err)
return
}
}