MCPcopy Index your code
hub / github.com/keploy/keploy / GenerateRandomContainerName

Function GenerateRandomContainerName

pkg/platform/http/utils/utils.go:40–48  ·  view source on GitHub ↗
(logger *zap.Logger, prefix string)

Source from the content-addressed store, hash-verified

38}
39
40func 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

Calls 2

ReadMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected