MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / panelRandomToken

Function panelRandomToken

internal/panel/handler.go:119–125  ·  view source on GitHub ↗
(size int)

Source from the content-addressed store, hash-verified

117}
118
119func panelRandomToken(size int) string {
120 buf := make([]byte, size)
121 if _, err := rand.Read(buf); err != nil {
122 return fmt.Sprintf("pulse-secret-%d", time.Now().UnixNano())
123 }
124 return fmt.Sprintf("%x", buf)
125}
126
127// ─── 公开 API ─────────────────────────────────────────────────────────────────
128

Callers 2

SyncUserInboundsMethod · 0.85
apiResetTokenMethod · 0.85

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected