MCPcopy Create free account
hub / github.com/InferCore/InferCore / randomHex

Function randomHex

internal/traceutil/ids.go:16–23  ·  view source on GitHub ↗
(byteLen int)

Source from the content-addressed store, hash-verified

14}
15
16func randomHex(byteLen int) string {
17 buf := make([]byte, byteLen)
18 if _, err := rand.Read(buf); err != nil {
19 // Fallback to deterministic zero value is acceptable for safety.
20 return hex.EncodeToString(make([]byte, byteLen))
21 }
22 return hex.EncodeToString(buf)
23}

Callers 2

NewTraceIDFunction · 0.85
NewSpanIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected