You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to automatically generate config structure for any command e.g.
var RootCmd = &cobra.Command{
Use: "foobar",
...
func init() {
//
// You need to define flags as usual.
//
RootCmd.PersistentFlags().String("foo", "", "Some foonees must be set")
RootCmd.PersistentFlags().String("foo-bar", "", "Some barness must be set")
...
So kind of self-updating code. The tricky part is to how to start this process. This could be done simply by having a dummy struct in the beginning to make sure code compiles.
The text was updated successfully, but these errors were encountered:
It would be nice to automatically generate config structure for any command e.g.
So kind of self-updating code. The tricky part is to how to start this process. This could be done simply by having a dummy struct in the beginning to make sure code compiles.
The text was updated successfully, but these errors were encountered: