diff options
Diffstat (limited to 'cmd/podman/common.go')
-rw-r--r-- | cmd/podman/common.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go index c1e15e2fb..1e7f8d4d8 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -6,6 +6,7 @@ import ( "os" "reflect" "regexp" + "sort" "strings" "github.com/containers/buildah" @@ -450,3 +451,10 @@ func getFormat(c *cli.Context) (string, error) { } return "", errors.Errorf("unrecognized image type %q", format) } + +func sortFlags(flags []cli.Flag) []cli.Flag { + sort.Slice(flags, func(i, j int) bool { + return strings.Compare(flags[i].GetName(), flags[j].GetName()) < 0 + }) + return flags +} |