Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
A lot of the CLI command where using desc instead of usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed May 24, 2022
1 parent 91790f4 commit 5cb04e7
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions pkg/cli/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5cb04e7

Please sign in to comment.