first commit

This commit is contained in:
2025-12-22 18:49:05 +01:00
commit 658ab8e961
19 changed files with 1356 additions and 0 deletions

21
config/config.go Normal file
View File

@@ -0,0 +1,21 @@
package config
import (
"os"
"github.com/pelletier/go-toml/v2"
)
func LoadConfig(config interface{}) {
if err := toml.Unmarshal(readFile("config.toml"), config); err != nil {
panic(err)
}
}
func readFile(path string) []byte {
data, err := os.ReadFile(path)
if err != nil {
panic(err)
}
return data
}