Default values for config

This commit is contained in:
Alexander
2026-05-04 16:27:04 +02:00
parent 268ee57913
commit f8040ec088
3 changed files with 21 additions and 10 deletions
+10 -2
View File
@@ -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
}