summaryrefslogtreecommitdiff
path: root/cmd/podman/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/common.go')
-rw-r--r--cmd/podman/common.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go
index 9ab0e57e5..838bbfc4f 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"
@@ -446,3 +447,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
+}