go-ozzo / ozzo-config

A Go (golang) package supporting layered application configuration in popular formats, such as JSON, YAML, TOML.
MIT License
111 stars 18 forks source link

Debugging ozzo-config.Config #5

Closed kolkov closed 8 years ago

kolkov commented 8 years ago

I builded a windows version of dalve and plugin that support it. But when I debugging my App, i don't see any values loaded into this struct...

func LoadConfig() *config.Config{
    // Load config
    c := config.New()
    c.Load("conf/config.json")
    return c
}
{
  "Version": "1.0",
  "StaticServer": {
    "Path": "./static"
  },
  "WebServer": {
    "PortHTTP": "8080",
    "PortHTTPS": "8088",
    "Domain": "localhost"
  },
  "Logger": {
    "Filename": "app.log",
    "Email": "****@gmail.com"
  },
  "Db":{
    "Type": "mysql",
    "Host": "localhost",
    "DbName": "inframe",
    "Login": "root",
    "Password": ""
  }
}

image Are you see the same on Mac or more?

qiangxue commented 8 years ago

This is expected since Config stores the configuration content as a reflect.Value. I don't have a good solution to help inspect the loaded config content...

kolkov commented 8 years ago

I think we need to call @ignatov to solve this.