Refactor everything

This commit is contained in:
Andrew-71 2024-10-12 21:45:00 +03:00
parent b07f1b080a
commit cda8f0cc1b
11 changed files with 162 additions and 59 deletions

20
config/config.go Normal file
View file

@ -0,0 +1,20 @@
package config
type Config struct {
Port int `json:"port"`
KeyFile string `json:"key-file"`
SQLiteFile string `json:"sqlite-file"`
}
var DefaultConfig = Config{
Port: 7102,
KeyFile: "private.key",
SQLiteFile: "data.db",
}
var Cfg = MustLoadConfig()
// TODO: Implement
func MustLoadConfig() Config {
return DefaultConfig
}