kubectl: Use Fprintf

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Fix typo

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Change Fprintf to Fprintln

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Use %q instead of %s

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Change %q to %s
This commit is contained in:
Gaurav Singh 2020-05-25 18:19:27 -04:00
parent 4e8b56e667
commit b326948a9a

View File

@ -586,9 +586,9 @@ func (o *GetOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e
if trackingWriter.Written == 0 && !o.IgnoreNotFound && len(allErrs) == 0 { if trackingWriter.Written == 0 && !o.IgnoreNotFound && len(allErrs) == 0 {
// if we wrote no output, and had no errors, and are not ignoring NotFound, be sure we output something // if we wrote no output, and had no errors, and are not ignoring NotFound, be sure we output something
if allResourcesNamespaced { if allResourcesNamespaced {
fmt.Fprintln(o.ErrOut, fmt.Sprintf("No resources found in %s namespace.", o.Namespace)) fmt.Fprintf(o.ErrOut, "No resources found in %s namespace.\n", o.Namespace)
} else { } else {
fmt.Fprintln(o.ErrOut, fmt.Sprintf("No resources found")) fmt.Fprintln(o.ErrOut, "No resources found")
} }
} }
return utilerrors.NewAggregate(allErrs) return utilerrors.NewAggregate(allErrs)