From d1fa7ff7a89ca687476af21ff3dbc89957abc61d Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Tue, 30 Aug 2016 22:17:53 -0700 Subject: [PATCH] Address comments. --- pkg/kubectl/cmd/delete_test.go | 2 +- pkg/kubectl/cmd/exec.go | 4 ++-- pkg/kubectl/cmd/logs.go | 2 +- pkg/kubectl/cmd/scale.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/kubectl/cmd/delete_test.go b/pkg/kubectl/cmd/delete_test.go index 1a5e938134d..33167e378d3 100644 --- a/pkg/kubectl/cmd/delete_test.go +++ b/pkg/kubectl/cmd/delete_test.go @@ -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"}, diff --git a/pkg/kubectl/cmd/exec.go b/pkg/kubectl/cmd/exec.go index 6ea11723103..4c9afcb4eb5 100644 --- a/pkg/kubectl/cmd/exec.go +++ b/pkg/kubectl/cmd/exec.go @@ -49,7 +49,7 @@ var ( ) const ( - execUsageStr = "expected 'exec [arg1] [arg2] ... [argN]'.\n and 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 ", "-p ") + printDeprecationWarning("exec POD_NAME", "-p POD_NAME") if len(argsIn) < 1 { return cmdutil.UsageError(cmd, execUsageStr) } diff --git a/pkg/kubectl/cmd/logs.go b/pkg/kubectl/cmd/logs.go index e4290919f83..413e7083ef3 100644 --- a/pkg/kubectl/cmd/logs.go +++ b/pkg/kubectl/cmd/logs.go @@ -54,7 +54,7 @@ var ( ) const ( - logsUsageStr = "expected 'exec [container-name]'.\n 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 { diff --git a/pkg/kubectl/cmd/scale.go b/pkg/kubectl/cmd/scale.go index b02ffb73bef..42712342041 100644 --- a/pkg/kubectl/cmd/scale.go +++ b/pkg/kubectl/cmd/scale.go @@ -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= flag is required, and 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{}