sort custom column print flags
Kubernetes-commit: 36ed148761cb5a30c21b45a64d95cabd1a9d07ff
This commit is contained in:
parent
cd2acba185
commit
b5be321e1a
|
@ -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