diff --git a/nomad/structs/funcs.go b/nomad/structs/funcs.go index 77e1902d0..212453aa3 100644 --- a/nomad/structs/funcs.go +++ b/nomad/structs/funcs.go @@ -382,7 +382,7 @@ func DenormalizeAllocationJobs(job *Job, allocs []*Allocation) { // AllocName returns the name of the allocation given the input. func AllocName(job, group string, idx uint) string { - return fmt.Sprintf("%s.%s[%d]", job, group, idx) + return job + "." + group + "[" + strconv.FormatUint(uint64(idx), 10) + "]" } // AllocSuffix returns the alloc index suffix that was added by the AllocName