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

chore: migrate configuration to fangs #1775

Closed
wants to merge 6 commits into from

Conversation

kzantow
Copy link
Contributor

@kzantow kzantow commented May 2, 2023

This PR migrates Syft to use the new fangs library to handle an aspect of configuration concerns -- integrating Cobra and Viper. This has a few immediate benefits:

  • Aligns Syft configuration more with recent tools like quill and chronicle
  • Fixes some bugs (e.g. running SYFT_OUTPUT=json syft alpine:latest -o table does not work as expected)
  • Removes some duplicated configuration code
  • Also removes some unused configuration code

This is related to #558, a path towards Syft 1.0

Signed-off-by: Keith Zantow <kzantow@gmail.com>
@@ -35,7 +35,7 @@ require (
github.com/spf13/afero v1.9.5
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.15.0
github.com/spf13/viper v1.15.0 // indirect
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🎉

cmd/syft/cli/version.go Outdated Show resolved Hide resolved
Copy link
Contributor

@wagoodman wagoodman left a comment

Choose a reason for hiding this comment

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

really nice enhancement 🐍 👍

Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow closed this Jun 22, 2023
@kzantow kzantow deleted the chore/use-fangs branch November 29, 2023 18:23
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.

None yet

2 participants