mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #108271 from kkkkun/sort-kubectl-output-format
sort kubectl get output format
This commit is contained in:
commit
f87e37c337
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user