Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Rationalise style of help strings (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
itowlson authored Oct 16, 2018
1 parent 809a09b commit ce1eaf8
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions cmd/duffle/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

const buildDesc = `
This command builds a CNAB bundle.
Builds a CNAB bundle.
`

const (
Expand Down Expand Up @@ -59,7 +59,7 @@ func newBuildCmd(out io.Writer) *cobra.Command {

cmd := &cobra.Command{
Use: "build [path]",
Short: "builds a CNAB bundle",
Short: "build a CNAB bundle",
Long: buildDesc,
PersistentPreRun: func(c *cobra.Command, args []string) {
build.dockerClientOptions.Common.SetDefaultOptions(f)
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

const credentialDesc = `
Manage credential sets
Manages credential sets.
`

func newCredentialsCmd(w io.Writer) *cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func newInitCmd(w io.Writer) *cobra.Command {

cmd := &cobra.Command{
Use: "init",
Short: "sets up local environment to work with duffle",
Short: "set up local environment to work with duffle",
Long: initDesc,
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

func newInstallCmd() *cobra.Command {
const usage = `Install a CNAB bundle
const usage = `Installs a CNAB bundle.
This installs a CNAB bundle with a specific installation name. Once the install is complete,
this bundle can be referenced by installation name.
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

const keyDesc = `
Manage OpenPGP keys, signatures, and attestations.
Manages OpenPGP keys, signatures, and attestations.
`

// TODO
Expand Down
6 changes: 2 additions & 4 deletions cmd/duffle/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ import (
)

func newPullCmd(w io.Writer) *cobra.Command {
const usage = `pulls a CNAB bundle from a repository
This command pulls a CNAB bundle into the cache without installing it.
const usage = `Pulls a CNAB bundle into the cache without installing it.
Example:
$ duffle pull duffle/example:0.1.0
`

cmd := &cobra.Command{
Use: "pull",
Short: "pulls a CNAB bundle from a repository",
Short: "pull a CNAB bundle from a repository",
Long: usage,
RunE: func(cmd *cobra.Command, args []string) error {
path, err := getBundleFile(args[0])
Expand Down
4 changes: 2 additions & 2 deletions cmd/duffle/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ type pushCmd struct {
}

func newPushCmd(out io.Writer) *cobra.Command {
const usage = `pushes a CNAB bundle to a repository`
const usage = `Pushes a CNAB bundle to a repository.`

var push = &pushCmd{out: out}

cmd := &cobra.Command{
Use: "push",
Short: usage,
Short: "push a CNAB bundle to a repository",
Long: usage,
RunE: func(_ *cobra.Command, args []string) error {
push.home = home.Home(homePath())
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

func newStatusCmd(w io.Writer) *cobra.Command {
const short = "get the status of an installation"
const long = `Get the status of an existing installation.
const long = `Gets the status of an existing installation.
Given an installation name, execute the status task for this. A status
action will restart the CNAB image and ask it to query for status. For that
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/deis/duffle/pkg/action"
)

const usage = `This command will uninstall an installation of a CNAB bundle.
const usage = `Uninstalls an installation of a CNAB bundle.
When using '--parameters' or '--set', the uninstall command will replace the old
parameters with the new ones supplied (even if the new set is an empty set). If neither
Expand Down
4 changes: 2 additions & 2 deletions cmd/duffle/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/deis/duffle/pkg/action"
)

const upgradeUsage = `This command will perform the upgrade action in the CNAB bundle`
const upgradeLong = `Upgrade an existing application.
const upgradeUsage = `perform the upgrade action in the CNAB bundle`
const upgradeLong = `Upgrades an existing application.
An upgrade can do the following:
Expand Down
2 changes: 1 addition & 1 deletion cmd/duffle/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func newVersionCmd(w io.Writer) *cobra.Command {
const usage = `prints current version of the Duffle CLI`
const usage = `print current version of the Duffle CLI`

cmd := &cobra.Command{
Use: "version",
Expand Down

0 comments on commit ce1eaf8

Please sign in to comment.