Refactor everything
This commit is contained in:
parent
b07f1b080a
commit
cda8f0cc1b
11 changed files with 162 additions and 59 deletions
20
config/config.go
Normal file
20
config/config.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue