()
| 24 | } |
| 25 | |
| 26 | func 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 |
no test coverage detected
searching dependent graphs…