config.Merge overwrites zero values from files if cli option is not provided
Closed this issue · 0 comments
moreirathomas commented
Description
Given this config:
request:
method: GET
url: http://localhost:9999?delay=10ms
queryParams:
fib: 5
timeout: 2s
runnerOptions:
requests: 0 # run until globalTimeout
concurrency: 99
globalTimeout: 60s
config.Merge
incorrectly defaults concurrency
to config.Default()
's value. This is because zero-values are always overwritten even when they have meaning.
Suggestions
We could find a way to "flag" config options as set or unset before merging to apply the correct strategy and only overwrite only if not already explicitly set.