Function
GenerateRandomContainerName
(logger *zap.Logger, prefix string)
Source from the content-addressed store, hash-verified
| 38 | } |
| 39 | |
| 40 | func GenerateRandomContainerName(logger *zap.Logger, prefix string) string { |
| 41 | randomBytes := make([]byte, 2) |
| 42 | if _, err := rand.Read(randomBytes); err != nil { |
| 43 | logger.Fatal("Failed to generate random part for container name", zap.Error(err)) |
| 44 | } |
| 45 | |
| 46 | uuidSuffix := hex.EncodeToString(randomBytes) |
| 47 | return prefix + uuidSuffix |
| 48 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected