refactor: sort output of version command
This commit is contained in:
parent
b34acefa21
commit
62ceca798c
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
abraFormatter "coopcloud.tech/abra/cli/formatter"
|
abraFormatter "coopcloud.tech/abra/cli/formatter"
|
||||||
@ -85,6 +86,10 @@ var appVersionCommand = &cli.Command{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.SliceStable(compose.Services, func(i, j int) bool {
|
||||||
|
return compose.Services[i].Name < compose.Services[j].Name
|
||||||
|
})
|
||||||
|
|
||||||
for _, service := range compose.Services {
|
for _, service := range compose.Services {
|
||||||
if status, ok := statuses[service.Name]; ok {
|
if status, ok := statuses[service.Name]; ok {
|
||||||
statusService := status.Services[0]
|
statusService := status.Services[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user