daemon/config.New(): rewrite to be slightly more idiomatic
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
5588a78ab3
commit
0ff80c844d
1 changed files with 8 additions and 4 deletions
|
@ -282,10 +282,14 @@ func (conf *Config) IsValueSet(name string) bool {
|
|||
|
||||
// New returns a new fully initialized Config struct
|
||||
func New() *Config {
|
||||
config := Config{}
|
||||
config.LogConfig.Config = make(map[string]string)
|
||||
config.ClusterOpts = make(map[string]string)
|
||||
return &config
|
||||
return &Config{
|
||||
CommonConfig: CommonConfig{
|
||||
LogConfig: LogConfig{
|
||||
Config: make(map[string]string),
|
||||
},
|
||||
ClusterOpts: make(map[string]string),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ParseClusterAdvertiseSettings parses the specified advertise settings
|
||||
|
|
Loading…
Add table
Reference in a new issue