MCPcopy Index your code
hub / github.com/pquerna/ffjson / nextSuffix

Function nextSuffix

generator/tempfile.go:26–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26func nextSuffix() string {
27 randmu.Lock()
28 r := rand
29 if r == 0 {
30 r = reseed()
31 }
32 r = r*1664525 + 1013904223 // constants from Numerical Recipes
33 rand = r
34 randmu.Unlock()
35 return strconv.Itoa(int(1e9 + r%1e9))[1:]
36}
37
38// TempFile creates a new temporary file in the directory dir
39// with a name beginning with prefix, opens the file for reading

Callers 1

TempFileWithPostfixFunction · 0.85

Calls 1

reseedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…