package config type Config struct { App struct { Port string `yaml:"port"` Host string `yaml:"host"` } `yaml:"app"` } func NewConfig() *Config { config := Config{} config.App.Host = "localhost" config.App.Port = "8080" return &config }