command: use ':' instead of ',' in error msg
This commit is contained in:
parent
bde560a863
commit
d0326503ac
|
@ -61,7 +61,7 @@ func (c *ACLPolicyApplyCommand) Run(args []string) int {
|
|||
// Check that we got two arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 2 {
|
||||
c.Ui.Error("This command takes two arguments, <name> and <path>")
|
||||
c.Ui.Error("This command takes two arguments: <name> and <path>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ func (c *ACLPolicyDeleteCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <name>")
|
||||
c.Ui.Error("This command takes one argument: <name>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ func (c *ACLPolicyInfoCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <name>")
|
||||
c.Ui.Error("This command takes one argument: <name>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ func (c *ACLTokenDeleteCommand) Run(args []string) int {
|
|||
// such token was provided.
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <token_accessor_id>")
|
||||
c.Ui.Error("This command takes one argument: <token_accessor_id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ func (c *ACLTokenInfoCommand) Run(args []string) int {
|
|||
// Check that we have exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <token_accessor_id>")
|
||||
c.Ui.Error("This command takes one argument: <token_accessor_id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ func (c *ACLTokenUpdateCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <token_accessor_id>")
|
||||
c.Ui.Error("This command takes one argument: <token_accessor_id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ func (f *AllocFSCommand) Run(args []string) int {
|
|||
}
|
||||
|
||||
if len(args) > 2 {
|
||||
f.Ui.Error("This command takes one or two arguments, <allocation> [<path>]")
|
||||
f.Ui.Error("This command takes one or two arguments: <allocation> [<path>]")
|
||||
f.Ui.Error(commandErrorText(f))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ func (c *DeploymentPauseCommand) Run(args []string) int {
|
|||
// Check that we got exactly 1 argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <deployment id>")
|
||||
c.Ui.Error("This command takes one argument: <deployment id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ func (c *DeploymentPromoteCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <deployment id>")
|
||||
c.Ui.Error("This command takes one argument: <deployment id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ func (c *DeploymentResumeCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <deployment id>")
|
||||
c.Ui.Error("This command takes one argument: <deployment id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ func (c *DeploymentStatusCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <deployment id>")
|
||||
c.Ui.Error("This command takes one argument: <deployment id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ func (c *JobDeploymentsCommand) Run(args []string) int {
|
|||
// Check that we got exactly one node
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <job>")
|
||||
c.Ui.Error("This command takes one argument: <job>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ func (c *JobDispatchCommand) Run(args []string) int {
|
|||
// Check that we got exactly one node
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <parameterized job>")
|
||||
c.Ui.Error("This command takes one argument: <parameterized job>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ func (c *JobHistoryCommand) Run(args []string) int {
|
|||
// Check that we got exactly one node
|
||||
args = flags.Args()
|
||||
if l := len(args); l < 1 || l > 2 {
|
||||
c.Ui.Error("This command takes one argument, <job>")
|
||||
c.Ui.Error("This command takes one argument: <job>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ func (c *JobInspectCommand) Run(args []string) int {
|
|||
|
||||
// Check that we got exactly one job
|
||||
if len(args) != 1 {
|
||||
c.Ui.Error("This command takes one argument, <job>")
|
||||
c.Ui.Error("This command takes one argument: <job>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ func (c *JobPlanCommand) Run(args []string) int {
|
|||
// Check that we got exactly one job
|
||||
args = flags.Args()
|
||||
if len(args) != 1 {
|
||||
c.Ui.Error("This command takes one argument, <path>")
|
||||
c.Ui.Error("This command takes one argument: <path>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 255
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ func (c *JobPromoteCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <job id>")
|
||||
c.Ui.Error("This command takes one argument: <job id>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ func (c *JobRevertCommand) Run(args []string) int {
|
|||
// Check that we got two args
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 2 {
|
||||
c.Ui.Error("This command takes two arguments, <job> <version>")
|
||||
c.Ui.Error("This command takes two arguments: <job> <version>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ func (c *JobRunCommand) Run(args []string) int {
|
|||
// Check that we got exactly one argument
|
||||
args = flags.Args()
|
||||
if len(args) != 1 {
|
||||
c.Ui.Error("This command takes one argument, <path>")
|
||||
c.Ui.Error("This command takes one argument: <path>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ func (c *JobStatusCommand) Run(args []string) int {
|
|||
// Check that we either got no jobs or exactly one.
|
||||
args = flags.Args()
|
||||
if len(args) > 1 {
|
||||
c.Ui.Error("This command takes either no arguments or one, <job>")
|
||||
c.Ui.Error("This command takes either no arguments or one: <job>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ func (c *JobStopCommand) Run(args []string) int {
|
|||
// Check that we got exactly one job
|
||||
args = flags.Args()
|
||||
if len(args) != 1 {
|
||||
c.Ui.Error("This command takes one argument, <job>")
|
||||
c.Ui.Error("This command takes one argument: <job>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ func (c *JobValidateCommand) Run(args []string) int {
|
|||
// Check that we got exactly one node
|
||||
args = flags.Args()
|
||||
if len(args) != 1 {
|
||||
c.Ui.Error("This command takes one argument, <path>")
|
||||
c.Ui.Error("This command takes one argument: <path>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ func (c *NamespaceApplyCommand) Run(args []string) int {
|
|||
// Check that we get exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <namespace>")
|
||||
c.Ui.Error("This command takes one argument: <namespace>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ func (c *NamespaceDeleteCommand) Run(args []string) int {
|
|||
// Check that we got one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <namespace>")
|
||||
c.Ui.Error("This command takes one argument: <namespace>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ func (c *NamespaceInspectCommand) Run(args []string) int {
|
|||
// Check that we got one arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <namespace>")
|
||||
c.Ui.Error("This command takes one argument: <namespace>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ func (c *NamespaceStatusCommand) Run(args []string) int {
|
|||
// Check that we got one arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <namespace>")
|
||||
c.Ui.Error("This command takes one argument: <namespace>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ func (c *QuotaApplyCommand) Run(args []string) int {
|
|||
// Check that we get exactly one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <input>")
|
||||
c.Ui.Error("This command takes one argument: <input>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ func (c *QuotaDeleteCommand) Run(args []string) int {
|
|||
// Check that we got one argument
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <quota>")
|
||||
c.Ui.Error("This command takes one argument: <quota>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ func (c *QuotaInspectCommand) Run(args []string) int {
|
|||
// Check that we got one arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <quota>")
|
||||
c.Ui.Error("This command takes one argument: <quota>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ func (c *QuotaStatusCommand) Run(args []string) int {
|
|||
// Check that we got one arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <quota>")
|
||||
c.Ui.Error("This command takes one argument: <quota>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ func (c *SentinelApplyCommand) Run(args []string) int {
|
|||
// Check that we got exactly two arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 2 {
|
||||
c.Ui.Error("This command takes exactly two arguments, <name> <file>")
|
||||
c.Ui.Error("This command takes exactly two arguments: <name> <file>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ func (c *SentinelDeleteCommand) Run(args []string) int {
|
|||
// Check that we got exactly one arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <name>")
|
||||
c.Ui.Error("This command takes one argument: <name>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ func (c *SentinelReadCommand) Run(args []string) int {
|
|||
// Check that we got exactly one arguments
|
||||
args = flags.Args()
|
||||
if l := len(args); l != 1 {
|
||||
c.Ui.Error("This command takes one argument, <name>")
|
||||
c.Ui.Error("This command takes one argument: <name>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ func (c *ServerForceLeaveCommand) Run(args []string) int {
|
|||
// Check that we got exactly one node
|
||||
args = flags.Args()
|
||||
if len(args) != 1 {
|
||||
c.Ui.Error("This command takes one argument, <node>")
|
||||
c.Ui.Error("This command takes one argument: <node>")
|
||||
c.Ui.Error(commandErrorText(c))
|
||||
return 1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue