import (
"fmt"
+ "math"
"os"
"path/filepath"
"sort"
// Early entries have higher priorities
groupPriority := make(map[string]int)
for i, x := range s.config.GroupOrder {
- groupPriority[x] = i + 1
+ groupPriority[x] = math.MinInt32 + i + 1
}
// Host itself always has highest priority
- groupPriority[s.host.Name] = -1
+ groupPriority[s.host.Name] = math.MinInt32
// Sort groups after priority and name
sort.Slice(groups, func(i, j int) bool {