Closed leandernikolaus closed 1 year ago
Some config options require logic or validation. Should this be done on initializing, as is done with the go routines or when retrieving the value, as is done with EvaluateInterval
.
https://github.com/relab/bandwidth-incentive-simulation/blob/9dcfd4a114f6d635166692f0bf9034cc0566c646/config/init_configs.go#L63-L66
@VHPL-UIS any preferences?
I prefer to do it on initialization phase and in Set functions. Get functions are responsible for retrieving the current value of a configuration option and should primarily focus on returning the value without any modification or validation.
The
config
module contains two types,Yml
andVariablesType
. One is parsed by from the file, values are then copied to the other one. Would be good to simplify this.