mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
sort custom column print flags
This commit is contained in:
parent
267272efe0
commit
36ed148761
@ -19,6 +19,7 @@ package get
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
@ -45,6 +46,7 @@ func (f *CustomColumnsPrintFlags) AllowedFormats() []string {
|
|||||||
for format := range columnsFormats {
|
for format := range columnsFormats {
|
||||||
formats = append(formats, format)
|
formats = append(formats, format)
|
||||||
}
|
}
|
||||||
|
sort.Strings(formats)
|
||||||
return formats
|
return formats
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user