diff --git a/main.go b/main.go index 024f753..0418a84 100644 --- a/main.go +++ b/main.go @@ -45,8 +45,8 @@ type DBConfig struct { } type Config struct { - env string - loglevel string + Env string `config:"env"` + Loglevel string `config:"loglevel"` Server struct { Port int `config:"port"` } `config:"server"` @@ -67,7 +67,7 @@ func main() { cfgErr := cfgReader.Read(&cfg) zapcfg := zap.NewProductionConfig() - if cfg.env == "dev" { + if cfg.Env == "dev" { zapcfg = zap.NewDevelopmentConfig() } logger, err := zapcfg.Build()