update auto can-i error message

Signed-off-by: song <tinysong1226@gmail.com>

Kubernetes-commit: 41762c588fc92e5d310649d2fa6133523a045f19
This commit is contained in:
song 2022-05-29 00:38:52 +08:00 committed by Kubernetes Publisher
parent 9e498c8888
commit 6f44e96c59
1 changed files with 3 additions and 1 deletions

View File

@ -174,7 +174,9 @@ func (o *CanIOptions) Complete(f cmdutil.Factory, args []string) error {
o.ResourceName = resourceTokens[1]
}
default:
return errors.New("you must specify two or three arguments: verb, resource, and optional resourceName")
errString := "you must specify two arguments: verb resource or verb resource/resourceName."
usageString := "See 'kubectl auth can-i -h' for help and examples."
return errors.New(fmt.Sprintf("%s\n%s", errString, usageString))
}
}