From 60fea7ca43100969fde16db9e56d075be622f1c1 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 c73f83732699..9f001e375652 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -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 }