From 5cb04e72c34d6673197eaa4453d052d10582a8ad Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 23 May 2022 19:26:32 -0700 Subject: [PATCH] A lot of the CLI command where using desc instead of usage --- pkg/cli/all.go | 6 +++--- pkg/cli/apps.go | 4 ++-- pkg/cli/build.go | 6 +++--- pkg/cli/containers.go | 4 ++-- pkg/cli/dev.go | 2 +- pkg/cli/images.go | 6 +++--- pkg/cli/init.go | 4 ++-- pkg/cli/log.go | 2 +- pkg/cli/volumes.go | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/pkg/cli/all.go b/pkg/cli/all.go index 4bffa2295..38913aff6 100644 --- a/pkg/cli/all.go +++ b/pkg/cli/all.go @@ -19,9 +19,9 @@ acorn all`, } type All struct { - Quiet bool `desc:"Output only names" short:"q"` - Output string `desc:"Output format (json, yaml, {{gotemplate}})" short:"o"` - Images bool `desc:"Include images in output" short:"i"` + Quiet bool `usage:"Output only names" short:"q"` + Output string `usage:"Output format (json, yaml, {{gotemplate}})" short:"o"` + Images bool `usage:"Include images in output" short:"i"` } func (a *All) Run(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/apps.go b/pkg/cli/apps.go index b4af3b660..ac86e0b4b 100644 --- a/pkg/cli/apps.go +++ b/pkg/cli/apps.go @@ -21,8 +21,8 @@ acorn app`, } type App struct { - Quiet bool `desc:"Output only names" short:"q"` - Output string `desc:"Output format (json, yaml, {{gotemplate}})" short:"o"` + Quiet bool `usage:"Output only names" short:"q"` + Output string `usage:"Output format (json, yaml, {{gotemplate}})" short:"o"` } func (a *App) Run(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/build.go b/pkg/cli/build.go index 1dc66e99f..81a688d2b 100644 --- a/pkg/cli/build.go +++ b/pkg/cli/build.go @@ -27,9 +27,9 @@ acorn build .`, } type Build struct { - File string `short:"f" desc:"Name of the build file" default:"DIRECTORY/acorn.cue"` - Tag []string `short:"t" desc:"Apply a tag to the final build"` - Platforms []string `short:"p" desc:"Target platforms (form os/arch[/variant][:osversion] example linux/amd64)"` + File string `short:"f" usage:"Name of the build file" default:"DIRECTORY/acorn.cue"` + Tag []string `short:"t" usage:"Apply a tag to the final build"` + Platforms []string `short:"p" usage:"Target platforms (form os/arch[/variant][:osversion] example linux/amd64)"` } func (s *Build) Run(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/containers.go b/pkg/cli/containers.go index f8ec8e167..174eeb5a0 100644 --- a/pkg/cli/containers.go +++ b/pkg/cli/containers.go @@ -21,8 +21,8 @@ acorn containers`, } type Container struct { - Quiet bool `desc:"Output only names" short:"q"` - Output string `desc:"Output format (json, yaml, {{gotemplate}})" short:"o"` + Quiet bool `usage:"Output only names" short:"q"` + Output string `usage:"Output format (json, yaml, {{gotemplate}})" short:"o"` } func (a *Container) Run(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/dev.go b/pkg/cli/dev.go index 70d2d0482..c16dd7580 100644 --- a/pkg/cli/dev.go +++ b/pkg/cli/dev.go @@ -22,7 +22,7 @@ func NewDev() *cobra.Command { } type Dev struct { - File string `short:"f" desc:"Name of the dev file" default:"DIRECTORY/acorn.cue"` + File string `short:"f" usage:"Name of the dev file" default:"DIRECTORY/acorn.cue"` Name string `usage:"Name of app to create" short:"n"` DNS []string `usage:"Assign a friendly domain to a published container (format public:private) (ex: example.com:web)" short:"b"` } diff --git a/pkg/cli/images.go b/pkg/cli/images.go index d661b9a65..38588286e 100644 --- a/pkg/cli/images.go +++ b/pkg/cli/images.go @@ -24,9 +24,9 @@ acorn images`, } type Image struct { - Quiet bool `desc:"Output only names" short:"q"` - NoTrunc bool `desc:"Don't truncate IDs"` - Output string `desc:"Output format (json, yaml, {{gotemplate}})" short:"o"` + Quiet bool `usage:"Output only names" short:"q"` + NoTrunc bool `usage:"Don't truncate IDs"` + Output string `usage:"Output format (json, yaml, {{gotemplate}})" short:"o"` } func (a *Image) Run(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/init.go b/pkg/cli/init.go index 65b259892..25731f71f 100644 --- a/pkg/cli/init.go +++ b/pkg/cli/init.go @@ -18,8 +18,8 @@ acorn init`, } type Init struct { - Image string `desc:"Override the default image used for the deployment"` - Output string `desc:"Output manifests instead of applying them (json, yaml)" short:"o"` + Image string `usage:"Override the default image used for the deployment"` + Output string `usage:"Output manifests instead of applying them (json, yaml)" short:"o"` } func (i *Init) Run(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/log.go b/pkg/cli/log.go index 5173a75c8..9dd0d983c 100644 --- a/pkg/cli/log.go +++ b/pkg/cli/log.go @@ -19,7 +19,7 @@ func NewLogs() *cobra.Command { } type Logs struct { - Follow bool `short:"f" desc:"Follow log output"` + Follow bool `short:"f" usage:"Follow log output"` } func (s *Logs) Run(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/volumes.go b/pkg/cli/volumes.go index 9732dbcda..9571d96a1 100644 --- a/pkg/cli/volumes.go +++ b/pkg/cli/volumes.go @@ -22,8 +22,8 @@ acorn volume`, } type Volume struct { - Quiet bool `desc:"Output only names" short:"q"` - Output string `desc:"Output format (json, yaml, {{gotemplate}})" short:"o"` + Quiet bool `usage:"Output only names" short:"q"` + Output string `usage:"Output format (json, yaml, {{gotemplate}})" short:"o"` } func (a *Volume) Run(cmd *cobra.Command, args []string) error {