mirror of https://github.com/knative/func.git
chore: remove [options] from usage string
The cobra package, magically appends "[flags]" to the usage string if a command has flags. By adding "[options]" to the usage string, we end up with help text that looks like this. ``` faas init <name> [options] [flags] ``` This commit fixes that.
This commit is contained in:
parent
5b93955f8b
commit
3868ef3441
|
@ -20,7 +20,7 @@ func init() {
|
|||
}
|
||||
|
||||
var buildCmd = &cobra.Command{
|
||||
Use: "build [options]",
|
||||
Use: "build",
|
||||
Short: "Build an existing Function project as an OCI image",
|
||||
SuggestFor: []string{"biuld", "buidl", "built"},
|
||||
PreRunE: bindEnv("image", "path", "repository", "confirm"),
|
||||
|
|
|
@ -38,7 +38,7 @@ func init() {
|
|||
}
|
||||
|
||||
var createCmd = &cobra.Command{
|
||||
Use: "create <name> [options]",
|
||||
Use: "create <name>",
|
||||
Short: "Create a new Function, including initialization of local files and deployment.",
|
||||
SuggestFor: []string{"cerate", "new"},
|
||||
PreRunE: bindEnv("image", "namespace", "path", "repository", "runtime", "templates", "trigger", "confirm"),
|
||||
|
|
|
@ -28,7 +28,7 @@ func init() {
|
|||
}
|
||||
|
||||
var describeCmd = &cobra.Command{
|
||||
Use: "describe <name> [options]",
|
||||
Use: "describe <name>",
|
||||
Short: "Describe Function",
|
||||
Long: `Describes the Function initialized in the current directory, or by passed name argument.`,
|
||||
SuggestFor: []string{"desc", "get"},
|
||||
|
|
|
@ -25,7 +25,7 @@ func init() {
|
|||
}
|
||||
|
||||
var initCmd = &cobra.Command{
|
||||
Use: "init <name> [options]",
|
||||
Use: "init <name>",
|
||||
Short: "Initialize a new Function project",
|
||||
SuggestFor: []string{"inti", "new"},
|
||||
PreRunE: bindEnv("path", "runtime", "templates", "trigger", "confirm"),
|
||||
|
|
|
@ -27,7 +27,7 @@ func init() {
|
|||
}
|
||||
|
||||
var listCmd = &cobra.Command{
|
||||
Use: "list [options]",
|
||||
Use: "list",
|
||||
Short: "Lists deployed Functions",
|
||||
Long: `Lists deployed Functions`,
|
||||
SuggestFor: []string{"ls", "lsit"},
|
||||
|
|
|
@ -22,7 +22,7 @@ func init() {
|
|||
}
|
||||
|
||||
var updateCmd = &cobra.Command{
|
||||
Use: "update [options]",
|
||||
Use: "update",
|
||||
Short: "Update or create a deployed Function",
|
||||
Long: `Update deployed Function to match the current local state.`,
|
||||
SuggestFor: []string{"push", "deploy"},
|
||||
|
|
Loading…
Reference in New Issue