fix: sort output of 'argocd-util resource-overrides action list' command (#3649)

This commit is contained in:
Alexander Matyushentsev 2020-05-26 10:49:28 -07:00 committed by GitHub
parent 23bf07d206
commit 91d5d7e37b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -487,6 +487,9 @@ argocd-util settings resource-overrides action list /tmp/deploy.yaml --argocd-cm
availableActions, err := luaVM.ExecuteResourceActionDiscovery(&res, discoveryScript)
errors.CheckError(err)
sort.Slice(availableActions, func(i, j int) bool {
return availableActions[i].Name < availableActions[j].Name
})
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
_, _ = fmt.Fprintf(w, "NAME\tENABLED\n")