MCPcopy Create free account
hub / github.com/goadesign/goa / shortID

Function shortID

http/middleware/debug.go:130–134  ·  view source on GitHub ↗

shortID produces a " unique" 6 bytes long string. Do not use as a reliable way to get unique IDs, instead use for things like logging.

()

Source from the content-addressed store, hash-verified

128// shortID produces a " unique" 6 bytes long string.
129// Do not use as a reliable way to get unique IDs, instead use for things like logging.
130func shortID() string {
131 b := make([]byte, 6)
132 io.ReadFull(rand.Reader, b) // nolint: errcheck
133 return base64.RawURLEncoding.EncodeToString(b)
134}

Callers 2

DebugFunction · 0.70
logFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected