-
Notifications
You must be signed in to change notification settings - Fork 75
chore: refactor flag_loader #715
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
base: main
Are you sure you want to change the base?
Conversation
5089e39 to
3c6a40d
Compare
Cobra Best Practices ResearchI've done some research on Cobra best practices to improve our CLI development. Here are the key findings: Flag Sharing Patterns
Viper + Cobra Integration
Key Pattern for ViperPersistentPreRunE: func(cmd *cobra.Command, args []string) error {
return viper.BindPFlags(cmd.Flags()) // Magic happens here
}Resources
|
f54a47e to
5256aa1
Compare
jhkimqd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge #822 into minhd-vu/flag-loader first then we could merge this into main - wdyt?
Description
flag_loaderpackage to the root directoryJira / Linear Tickets
Testing