-
Notifications
You must be signed in to change notification settings - Fork 69
Generate CLI docs. #192
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
Generate CLI docs. #192
Conversation
2f49f3c
to
842da45
Compare
From experience, you may want a CI check that fails if these docs haven't been updated.
|
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 to presubmit
@@ -35,8 +33,6 @@ func main() { | |||
} | |||
|
|||
rootCmd := root.New(cfg) | |||
rootCmd.AddCommand(version.New(cfg)) |
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.
Any reason for this other than to keep main clean?
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.
Yeah - the doc generator needs the subcommands to be added to pick them up. This moves the AddCommand's to the rootCmd creation to guarantee both main's have the same command tree.
Signed-off-by: Billy Lynch <billy@chainguard.dev>
Signed-off-by: Billy Lynch <billy@chainguard.dev>
Summary
Generate CLI docs for all cobra commands.
Release Note
NONE
Documentation
📖 📖 📖