MCPcopy Create free account
hub / github.com/apecloud/myduckserver / genRandomString

Function genRandomString

flightsqlserver/sqlite_server.go:64–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 "google.golang.org/grpc/status"
63 _ "modernc.org/sqlite"
64)
65
66func genRandomString() []byte {
67 const length = 16
68 max := int('z')
69 // don't include ':' as a valid byte to generate
70 // because we use it as a separator for the transactions
71 min := int('<')
72
73 out := make([]byte, length)
74 for i := range out {
75 out[i] = byte(rand.Intn(max-min+1) + min)
76 }
77 return out
78}
79

Callers 2

BeginTransactionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected