MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / randomProviderName

Function randomProviderName

internal/wsrelay/manager.go:195–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193}
194
195func randomProviderName() string {
196 const alphabet = "abcdefghijklmnopqrstuvwxyz0123456789"
197 buf := make([]byte, 16)
198 if _, err := rand.Read(buf); err != nil {
199 return fmt.Sprintf("aistudio-%x", time.Now().UnixNano())
200 }
201 for i := range buf {
202 buf[i] = alphabet[int(buf[i])%len(alphabet)]
203 }
204 return "aistudio-" + string(buf)
205}

Callers 1

handleWebsocketMethod · 0.85

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected