Merge pull request #108271 from kkkkun/sort-kubectl-output-format

sort kubectl get output format
This commit is contained in:
Kubernetes Prow Robot 2022-03-18 10:58:41 -07:00 committed by GitHub
commit f87e37c337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}