MCPcopy Create free account
hub / github.com/astercloud/aster / generateID

Function generateID

pkg/desktop/utils.go:11–17  ·  view source on GitHub ↗

generateID generates a unique ID

()

Source from the content-addressed store, hash-verified

9
10// generateID generates a unique ID
11func generateID() string {
12 b := make([]byte, 16)
13 if _, err := rand.Read(b); err != nil {
14 panic(err) // Crypto RNG failure is unrecoverable
15 }
16 return hex.EncodeToString(b)
17}
18
19// mustMarshal marshals value to JSON, panics on error
20func mustMarshal(v any) json.RawMessage {

Callers 15

ChatMethod · 0.70
CancelMethod · 0.70
ApproveMethod · 0.70
GetStatusMethod · 0.70
GetHistoryMethod · 0.70
ClearHistoryMethod · 0.70
SetConfigMethod · 0.70
GetConfigMethod · 0.70
TestGenerateIDFunction · 0.70
handleChatMethod · 0.70
handleCancelMethod · 0.70
handleApproveMethod · 0.70

Calls 1

ReadMethod · 0.65

Tested by 1

TestGenerateIDFunction · 0.56