Address comments.

This commit is contained in:
Brendan Burns 2016-08-30 22:17:53 -07:00
parent 155fb9f4be
commit d1fa7ff7a8
4 changed files with 5 additions and 5 deletions

View File

@ -457,7 +457,7 @@ func TestResourceErrors(t *testing.T) {
}{
"no args": {
args: []string{},
errFn: func(err error) bool { return strings.Contains(err.Error(), "you must provide one or more resources") },
errFn: func(err error) bool { return strings.Contains(err.Error(), "You must provide one or more resources") },
},
"resources but no selectors": {
args: []string{"pods"},

View File

@ -49,7 +49,7 @@ var (
)
const (
execUsageStr = "expected 'exec <pod-name> <command> [arg1] [arg2] ... [argN]'.\n<pod-name> and <command> are required parameter for the exec command"
execUsageStr = "expected 'exec POD_NAME COMMAND [ARG1] [ARG2] ... [ARGN]'.\nPOD_NAME and COMMAND are required arguments for the exec command"
)
func NewCmdExec(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command {
@ -142,7 +142,7 @@ func (p *ExecOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, argsIn []
return cmdutil.UsageError(cmd, execUsageStr)
}
if len(p.PodName) != 0 {
printDeprecationWarning("exec <pod-name>", "-p <pod-name>")
printDeprecationWarning("exec POD_NAME", "-p POD_NAME")
if len(argsIn) < 1 {
return cmdutil.UsageError(cmd, execUsageStr)
}

View File

@ -54,7 +54,7 @@ var (
)
const (
logsUsageStr = "expected 'exec <pod-name> [container-name]'.\n<pod-name> is a required parameter for the logs command"
logsUsageStr = "expected 'logs POD_NAME [CONTAINER_NAME]'.\nPOD_NAME is a required argument for the logs command"
)
type LogsOptions struct {

View File

@ -124,7 +124,7 @@ func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri
count := cmdutil.GetFlagInt(cmd, "replicas")
if count < 0 {
return cmdutil.UsageError(cmd, "The --replicas=<count> flag is required, and <count> must be greater than or equal to 0")
return cmdutil.UsageError(cmd, "The --replicas=COUNT flag is required, and COUNT must be greater than or equal to 0")
}
infos := []*resource.Info{}