generateSuffix generates a random hex string between `0000` and `ffff`.
()
| 131 | |
| 132 | // generateSuffix generates a random hex string between `0000` and `ffff`. |
| 133 | func generateSuffix() string { |
| 134 | numMin := 0x00000 |
| 135 | numMax := 0x10000 |
| 136 | //nolint:gosec // We don't need a cryptographically secure random number generator for generating a task name suffix. |
| 137 | num := rand.IntN(numMax-numMin) + numMin |
| 138 | |
| 139 | return fmt.Sprintf("%04x", num) |
| 140 | } |
| 141 | |
| 142 | // generateFallback generates a random task name when other methods fail. |
| 143 | // Uses Docker-style name generation with a collision-resistant suffix. |
no outgoing calls
no test coverage detected