Change kubectl list option stdout

This commit is contained in:
zhouya0 2020-07-01 17:00:25 +08:00
parent a138be8722
commit abad08d915
2 changed files with 2 additions and 2 deletions

View File

@ -364,7 +364,7 @@ func (o AnnotateOptions) RunAnnotate() error {
if err != nil {
return err
}
fmt.Fprintf(o.ErrOut, "Listing annotations for %s.%s/%s:\n", gvks[0].Kind, gvks[0].Group, info.Name)
fmt.Fprintf(o.Out, "Listing annotations for %s.%s/%s:\n", gvks[0].Kind, gvks[0].Group, info.Name)
}
for k, v := range accessor.GetAnnotations() {
fmt.Fprintf(o.Out, "%s%s=%s\n", indent, k, v)

View File

@ -362,7 +362,7 @@ func (o *LabelOptions) RunLabel() error {
if err != nil {
return err
}
fmt.Fprintf(o.ErrOut, "Listing labels for %s.%s/%s:\n", gvks[0].Kind, gvks[0].Group, info.Name)
fmt.Fprintf(o.Out, "Listing labels for %s.%s/%s:\n", gvks[0].Kind, gvks[0].Group, info.Name)
}
for k, v := range accessor.GetLabels() {
fmt.Fprintf(o.Out, "%s%s=%s\n", indent, k, v)