newRandomStringN creates a new random string of length n.
(n int)
| 61 | |
| 62 | // newRandomStringN creates a new random string of length n. |
| 63 | func newRandomStringN(n int) string { |
| 64 | randBytes := make([]byte, n/2) |
| 65 | _, _ = rand.Read(randBytes) |
| 66 | |
| 67 | return fmt.Sprintf("%x", randBytes) |
| 68 | } |
no test coverage detected