sort custom column print flags

Kubernetes-commit: 36ed148761cb5a30c21b45a64d95cabd1a9d07ff
This commit is contained in:
kkkkun 2022-03-03 22:31:58 +08:00 committed by Kubernetes Publisher
parent cd2acba185
commit b5be321e1a
1 changed files with 2 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package get
import (
"fmt"
"os"
"sort"
"strings"
"github.com/spf13/cobra"
@ -45,6 +46,7 @@ func (f *CustomColumnsPrintFlags) AllowedFormats() []string {
for format := range columnsFormats {
formats = append(formats, format)
}
sort.Strings(formats)
return formats
}