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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate viper usage in pkg/ca/ca.go #255

Merged
merged 1 commit into from Dec 2, 2021

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented Dec 2, 2021

Using viper (like flags, logging) insider of libraries is a bit of a code smell, so I started to look at where we were using viper directly, and started threading particular bits of configuration through as params, which seems to be the most natural way to do this in most contexts.

Right now there is still a big wad of usage in pkg/ca/ca.go (almost entirely in CA()), which I'm going to start looking into next, but at least the remainder have been eliminated. 馃挜

Signed-off-by: Matt Moore mattmoor@chainguard.dev

Ticket Link

N/A

Release Note

NONE

Using `viper` (like flags, logging) insider of libraries is a bit of a code smell, so I started to look at where we were using viper directly, and started threading particular bits of configuration through as params, which seems to be the most natural way to do this in most contexts.

Right now there is still a big wad of usage in `pkg/ca/ca.go`, which I'm going to start looking into next, but at least the remainder have been eliminated.

Signed-off-by: Matt Moore <mattmoor@chainguard.dev>
@mattmoor mattmoor mentioned this pull request Dec 2, 2021
@dlorenc dlorenc merged commit 297c9e3 into sigstore:main Dec 2, 2021
@mattmoor mattmoor deleted the consolidate-viper branch December 2, 2021 03:08
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

3 participants