docs: add generated CLI help output to repo (#46)

Generate the help pages using `cobras` builtin functionality and commit
them to the repository. This gives users to ability to review the
options of `hcloud-upload-image` without having to install it first.
This commit is contained in:
Julian Tölle 2024-11-02 21:57:53 +01:00 committed by GitHub
parent b181eebd38
commit 4e24d83c7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 188 additions and 18 deletions

View file

@ -29,8 +29,8 @@ var uploadCmd = &cobra.Command{
Long: `This command implements a fake "upload", by going through a real server and snapshots.
This does cost a bit of money for the server.`,
Example: ` hcloud-upload-image upload --image-path /home/you/images/custom-linux-image-x86.bz2 --architecture x86 --compression bz2 --description "My super duper custom linux"
hcloud-upload-image upload --image-url https://examples.com/image-arm.raw --architecture arm --labels foo=bar,version=latest
`,
hcloud-upload-image upload --image-url https://examples.com/image-arm.raw --architecture arm --labels foo=bar,version=latest`,
DisableAutoGenTag: true,
GroupID: "primary",
@ -88,7 +88,7 @@ This does cost a bit of money for the server.`,
}
func init() {
rootCmd.AddCommand(uploadCmd)
RootCmd.AddCommand(uploadCmd)
uploadCmd.Flags().String(uploadFlagImageURL, "", "Remote URL of the disk image that should be uploaded")
uploadCmd.Flags().String(uploadFlagImagePath, "", "Local path to the disk image that should be uploaded")