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

marshal: replace github.com/ghodss/yaml with gopkg.in/yaml.v2 #347

Merged
merged 2 commits into from
Jul 14, 2023
Merged

marshal: replace github.com/ghodss/yaml with gopkg.in/yaml.v2 #347

merged 2 commits into from
Jul 14, 2023

Conversation

Juneezee
Copy link
Contributor

Hi 👋

The github.com/ghodss/yaml package is no longer actively maintained. There are numerous inquiries about the project's status on its issue tracker: https://github.com/ghodss/yaml/issues.

Since we are only using the JSONToYAML from github.com/ghodss/yaml, we can implement the code ourselves 1 and remove an extra dependency.


Alternatively, we can replace github.com/ghodss/yaml with sigs.k8s.io/yaml, which is a permanent fork currently maintained by Kubernetes SIG. Please let me know if you prefer using a package for YAML unmarshalling, and I will gladly update this pull request.

Footnotes

  1. https://github.com/ghodss/yaml/blob/0ca9ea5df5451ffdf184b4428c902747c2c11cd7/yaml.go#L45-L61

At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

Since we are only using the `JSONToYAML` from `github.com/ghodss/yaml`,
we can write the code ourselves and drop an extra dependency.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
go.mod Outdated
github.com/jaypipes/pcidb v1.0.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v0.0.3
gopkg.in/yaml.v2 v2.4.0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about gopkg.in/yaml.v3 instead? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to gopkg.in/yaml.v3

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you @Juneezee! :)

@jaypipes jaypipes merged commit 275fa48 into jaypipes:main Jul 14, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants