Description
The build fails when using Go versions older than 1.21 because the codebase uses the `slices` package which was introduced in Go 1.21.
Error Message
internal/api/websocket.go:7:2: package slices is not in GOROOT (/usr/lib/go-1.18/src/slices)
Location
- File:
internal/api/websocket.go:52
- Usage:
slices.ContainsFunc() for origin validation
Suggested Fix
Either:
- Document the minimum Go version requirement (Go 1.21+) in README and go.mod
- Replace
slices.ContainsFunc() with a manual loop for backward compatibility