Skip to content

Commit

Permalink
refactor(cmd): simplify applyDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Mirić authored and srguglielmo committed Nov 3, 2019
1 parent 94d5f72 commit 60fea7c
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 60fea7c

Please sign in to comment.