beast
beast copied to clipboard
Wrap BeastConfig and Config struct initialization to a New function
Currently, the structs objects are initialized manually by providing values to the struct fields directly. This leaves us with a situation where we have to rely on the Validate
method for default values to be populated. Wrap all such places with a function in config like NewBeastConfig
and NewChallengeConfig
and decode the values from the toml so that default values can be sensibly initialized. View the issue to look at how we can deal with this
https://github.com/BurntSushi/toml/issues/47