sort custom column print flags

This commit is contained in:
kkkkun 2022-03-03 22:31:58 +08:00
parent 267272efe0
commit 36ed148761

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
}