()
| 107 | } |
| 108 | |
| 109 | func panelRandomUUID() string { |
| 110 | buf := make([]byte, 16) |
| 111 | if _, err := rand.Read(buf); err != nil { |
| 112 | return fmt.Sprintf("pulse-%d", time.Now().UnixNano()) |
| 113 | } |
| 114 | buf[6] = (buf[6] & 0x0f) | 0x40 |
| 115 | buf[8] = (buf[8] & 0x3f) | 0x80 |
| 116 | return fmt.Sprintf("%x-%x-%x-%x-%x", buf[0:4], buf[4:6], buf[6:8], buf[8:10], buf[10:16]) |
| 117 | } |
| 118 | |
| 119 | func panelRandomToken(size int) string { |
| 120 | buf := make([]byte, size) |
no test coverage detected