Closed a-urth closed 4 years ago
Syntax for map of scalar values is defined in readme and pretty straightforward in form of key: value
key: value
But whats the syntax for config with field being map of structs or other maps? Or is it possible in general? Example
type Config struct { API map[string]APIConfig `required:"true"` } type APIConfig struct { Host string `required:"true"` Headers map[string]string `required:"false"` }
Ok, I see, because of how map is parsed its impossible.
Syntax for map of scalar values is defined in readme and pretty straightforward in form of
key: value
But whats the syntax for config with field being map of structs or other maps? Or is it possible in general? Example