Initial commit

This commit is contained in:
speatzle 2024-04-25 21:53:01 +02:00
commit 1437edd55a
3 changed files with 38 additions and 0 deletions

31
main.go Normal file
View file

@ -0,0 +1,31 @@
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
}
}