Commit 2a79a1cf authored by Kyle Clarke's avatar Kyle Clarke 💬

Renamed buff variable name to the more goeey "b" for a byte value.

parent 087bb77f
Pipeline #4933871 passed with stage
in 33 seconds
......@@ -100,14 +100,14 @@ func GenerateID(ID ...string) JobID {
return JobID(ID[0])
} else {
unix32bits := uint32(time.Now().UTC().Unix())
buff := make([]byte, 12)
numRead, err := rand.Read(buff)
if numRead != len(buff) || err != nil {
b := make([]byte, 12)
numRead, err := rand.Read(b)
if numRead != len(b) || err != nil {
// On return an empty string ID
return JobID("")
}
return JobID(fmt.Sprintf("%x%x", unix32bits, buff))
return JobID(fmt.Sprintf("%x%x", unix32bits, b))
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment