Default values for config
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
package config
|
||||
|
||||
type Config struct {
|
||||
Server struct {
|
||||
App struct {
|
||||
Port string `yaml:"port"`
|
||||
Host string `yaml:"host"`
|
||||
} `yaml:"server"`
|
||||
} `yaml:"app"`
|
||||
}
|
||||
|
||||
func NewConfig() *Config {
|
||||
config := Config{}
|
||||
config.App.Host = "localhost"
|
||||
config.App.Port = "8080"
|
||||
|
||||
return &config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user