templatize error message in DeleteOptions

Signed-off-by: Steve Kriss <steve@heptio.com>
This commit is contained in:
Steve Kriss
2018-10-05 13:24:30 -06:00
parent 1da3278ad6
commit 0612c5de70

View File

@@ -71,7 +71,7 @@ func (o *DeleteOptions) Validate(c *cobra.Command, f client.Factory, args []stri
hasSelector = o.Selector.LabelSelector != nil
)
if !xor(hasNames, hasAll, hasSelector) {
return errors.New("you must specify exactly one of: specific restore name(s), the --all flag, or the --selector flag")
return errors.New("you must specify exactly one of: specific " + o.singularTypeName + " name(s), the --all flag, or the --selector flag")
}
return nil