Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace JSON/YAML marshaling with just YAML marshaling #35

Open
eyal-mor opened this issue Feb 16, 2023 · 0 comments
Open

Replace JSON/YAML marshaling with just YAML marshaling #35

eyal-mor opened this issue Feb 16, 2023 · 0 comments
Labels
DevX Developer Experience related

Comments

@eyal-mor
Copy link
Contributor

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.

@dkirillov dkirillov added the DevX Developer Experience related label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevX Developer Experience related
Projects
None yet
Development

No branches or pull requests

2 participants