Files
magpie/internal/gateway/uuid.go
T
yetone e431f71a89 gateway, provider: the code only the retired built-ins used is removed
With all eleven built-ins retired, staticcheck U1000 (diffed against
1978eabe5, the stack's base) named what only they reached:

- internal/gateway/connect_pb.go: the hand-made protobuf and Connect
  frames, kept for Cursor's built-in after Devin's went; Cursor's is gone.
- joinNonEmpty (uuid.go), said (said_test.go) and
  askClaudeCodeWebSearch (search_workbuddy_test.go).
- devinAuthorizeURL (signin.go).

The rest of U1000's list is the same at 1978eabe5.

Run: gofmt -l internal clean; go vet -tags nogui ./... on darwin,
GOOS=linux and GOOS=windows clean; the full suite runs at the stack's
head (recorded in the push).
2026-10-17 23:11:01 +08:00

16 lines
287 B
Go

package gateway
import (
"crypto/rand"
"fmt"
)
// newUUID is a random (version 4) UUID.
func newUUID() string {
var b [16]byte
_, _ = rand.Read(b[:])
b[6] = b[6]&0x0f | 0x40
b[8] = b[8]&0x3f | 0x80
return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
}