shore
shore copied to clipboard
Replace JSON/YAML marshaling with just YAML marshaling
Original Author: @dkirillov
Summary
The readConfigFile
function is able to read both YAML and JSON file. Using a switch-statement it picks the correct class to unmarshal data with.
This switch statement can be removed in favor of using just YAML (from gopkg.in/yaml.v3
) to unmarshal things.
Motivation
Reduce and make cleaner code.
Describe alternatives you've considered
N/A
Additional context
An attempt was made, however, started to look like a rabbit hole with the errors that would come up (see screenshot below).
It should be possible, just would need to have a separate PR for clarity.