diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 6539d4b9a..60be7e20c 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -5431,7 +5431,7 @@ func (s *Spread) String() string { if s.str != "" { return s.str } - s.str = fmt.Sprintf("%s %s %v", s.Attribute, s.Weight, s.SpreadTarget) + s.str = fmt.Sprintf("%s %s %v", s.Attribute, s.SpreadTarget, s.Weight) return s.str } diff --git a/scheduler/propertyset.go b/scheduler/propertyset.go index 8e664254e..0218b0326 100644 --- a/scheduler/propertyset.go +++ b/scheduler/propertyset.go @@ -75,7 +75,7 @@ func (p *propertySet) SetTGConstraint(constraint *structs.Constraint, taskGroup // setConstraint is a shared helper for setting a job or task group constraint. func (p *propertySet) setConstraint(constraint *structs.Constraint, taskGroup string) { - allowedCount := uint64(0) + var allowedCount uint64 // Determine the number of allowed allocations with the property. if v := constraint.RTarget; v != "" { c, err := strconv.ParseUint(v, 10, 64)