mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
core: use faster concatenation for alloc name generation. (#17591)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user