MCPcopy Create free account
hub / github.com/chain/Core / pickName

Function pickName

database/pg/pgtest/pgtest.go:239–245  ·  view source on GitHub ↗
(prefix string)

Source from the content-addressed store, hash-verified

237}
238
239func pickName(prefix string) (s string) {
240 const chars = "abcdefghijklmnopqrstuvwxyz"
241 for i := 0; i < 10; i++ {
242 s += string(chars[random.Intn(len(chars))])
243 }
244 return formatPrefix(prefix, time.Now()) + s
245}
246
247func formatPrefix(prefix string, t time.Time) string {
248 return "pgtest_" + prefix + "_" + t.UTC().Format(timeFormat) + "Z_"

Callers 3

WrapDBFunction · 0.85
CloneDBFunction · 0.85
openFunction · 0.85

Calls 1

formatPrefixFunction · 0.85

Tested by

no test coverage detected