Skip to content

Commit

Permalink
refactor(cmd): simplify applyDefault
Browse files Browse the repository at this point in the history
Resolves: #1143 (comment)
  • Loading branch information
Ivan Mirić committed Oct 30, 2019
1 parent 26f932a commit 51e88e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/config.go
Expand Up @@ -328,10 +328,10 @@ func getConsolidatedConfig(fs afero.Fs, cliConf Config, runner lib.Runner) (conf
// Note that if you add option default value here, also add it in command line argument help text.
func applyDefault(conf Config) Config {
if conf.Options.SystemTags == nil {
conf = conf.Apply(Config{Options: lib.Options{SystemTags: &stats.DefaultSystemTagSet}})
conf.Options.SystemTags = &stats.DefaultSystemTagSet
}
if conf.Options.SummaryTrendStats == nil {
conf = conf.Apply(Config{Options: lib.Options{SummaryTrendStats: lib.DefaultSummaryTrendStats}})
conf.Options.SummaryTrendStats = lib.DefaultSummaryTrendStats
}
return conf
}
Expand Down

0 comments on commit 51e88e0

Please sign in to comment.