shore icon indicating copy to clipboard operation
shore copied to clipboard

Replace JSON/YAML marshaling with just YAML marshaling

Open eyal-mor opened this issue 2 years ago • 0 comments

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.

eyal-mor avatar Feb 16 '23 12:02 eyal-mor