From b1b488ece35ec504ecfa7a72fedfa234156240d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Miri=C4=87?= Date: Wed, 30 Oct 2019 10:07:07 +0100 Subject: [PATCH] refactor(cmd): simplify applyDefault Resolves: https://github.com/loadimpact/k6/pull/1143#discussion_r340462472 --- cmd/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/config.go b/cmd/config.go index ce5eeba46144..c7c6b1a9f124 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -329,10 +329,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 }