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

Feature: Properly bind viper and cobra #14

Closed
Avokadoen opened this issue Mar 12, 2021 · 0 comments · Fixed by #19
Closed

Feature: Properly bind viper and cobra #14

Avokadoen opened this issue Mar 12, 2021 · 0 comments · Fixed by #19
Labels
enhancement New feature or request

Comments

@Avokadoen
Copy link
Contributor

Avokadoen commented Mar 12, 2021

Is your feature request related to a problem? Please describe.
There is a lot of bloat when it comes to binding viper and cobra

Describe the solution you'd like
Bind viper and cobra variables

if err := viper.BindPFlags(cmd.Flags()); err != nil {
	log.Fatalf("Failed to bind serve flags: %v", err)
}

Describe alternatives you've considered

Additional context
nlnwa/gowarc@1e8ab14#diff-ba80d9a080c8fa689d8dfa784ab21bea256579ab97f2aef8c28c9e3adb0289edR53

@Avokadoen Avokadoen added the enhancement New feature or request label Mar 12, 2021
@Avokadoen Avokadoen self-assigned this Mar 28, 2021
Avokadoen added a commit to Avokadoen/gowarcserver that referenced this issue Mar 30, 2021
Avokadoen added a commit to Avokadoen/gowarcserver that referenced this issue Mar 31, 2021
Avokadoen added a commit to Avokadoen/gowarcserver that referenced this issue Mar 31, 2021
* Update readme documentation
* BREAKING: use one naming convention across cobra and viper (camelCase)
* Move cmd specific config variables from root to their specific cmd
@Avokadoen Avokadoen linked a pull request Apr 3, 2021 that will close this issue
@Avokadoen Avokadoen removed their assignment Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant