chore: always sort returned formations
This commit is contained in:
@@ -212,6 +212,7 @@ func getFormations(appName string) (FormationSlice, error) {
|
||||
formations = append(formations, formation)
|
||||
}
|
||||
|
||||
sort.Sort(formations)
|
||||
return formations, nil
|
||||
}
|
||||
|
||||
@@ -236,7 +237,6 @@ func scaleReport(appName string) error {
|
||||
content = append(content, "proctype=qty", "--------=---")
|
||||
}
|
||||
|
||||
sort.Sort(formations)
|
||||
for _, formation := range formations {
|
||||
content = append(content, fmt.Sprintf("%s=%d", formation.ProcessType, formation.Quantity))
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@@ -298,7 +297,6 @@ func TriggerPsCurrentScale(appName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
sort.Sort(formations)
|
||||
lines := []string{}
|
||||
for _, formation := range formations {
|
||||
lines = append(lines, fmt.Sprintf("%s=%d", formation.ProcessType, formation.Quantity))
|
||||
|
||||
Reference in New Issue
Block a user