mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
feat: always get keys in order
Ranging over maps is unordered in golang, so we need to use the correct data structure if we need the output in an ordered way.
This commit is contained in:
@@ -120,16 +120,16 @@ func reportRequestType(appName string, processType string, requestType string) (
|
||||
}
|
||||
common.LogInfo2Quiet(message)
|
||||
|
||||
resources := map[string]bool{
|
||||
"cpu": true,
|
||||
"memory": true,
|
||||
"memory-swap": true,
|
||||
"network": true,
|
||||
"network-ingress": true,
|
||||
"network-egress": true,
|
||||
resources := []string{
|
||||
"cpu",
|
||||
"memory",
|
||||
"memory-swap",
|
||||
"network",
|
||||
"network-ingress",
|
||||
"network-egress",
|
||||
}
|
||||
|
||||
for key := range resources {
|
||||
for _, key := range resources {
|
||||
property := propertyKey(processType, requestType, key)
|
||||
value := common.PropertyGet("resource", appName, property)
|
||||
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
|
||||
|
||||
Reference in New Issue
Block a user