Change kubectl list option stdout

Kubernetes-commit: abad08d915531a6f8686f58a8cb41395ed77c714
This commit is contained in:
zhouya0 2020-07-01 17:00:25 +08:00 committed by Kubernetes Publisher
parent 54a533a9db
commit 384af9bcb2
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)