You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Local dev is broken - TestHeaderBuilder fails on macOS, go vet errors, Makefile build bugs #25
Several small items make local development noisy. All verified on master@a4ebe30 (go1.27, macOS):
go test ./pkg/ -run TestHeaderBuilderfails on macOS: the test hardcodes chunk 60000 while HeaderBuilder.Build returns 9000 on darwin (pkg/header.go:96). The test needs to be platform-aware, or the chunk size should be injectable.
go vet ./...fails:
pkg/sender.go:60:45: address format "%s:%d" does not work with IPv6
pkg/sender.go:125:48: address format "%s:%d" does not work with IPv6
Use net.JoinHostPort (or &net.UDPAddr{IP: ..., Port: ...}) instead of fmt.Sprintf("%s:%d", ...).
Makefile: CGO_ENABLE=0 is a typo for CGO_ENABLED=0 (all build targets).
Makefile build-gui builds the same output path twice — the second build (without -H=windowsgui) overwrites the GUI build, so the flag never takes effect:
build-gui:
CGO_ENABLE=0 GOOS=windows go build -ldflags -H=windowsgui -o bin/win/transfer-gui.exe ui/main.go
CGO_ENABLE=0 GOOS=windows go build -o bin/win/transfer-gui.exe ui/main.go
Dead code: pkg/queue.go (Queue) and SafeMap.Get are referenced only from tests; also Queue.Size() reads len(q.data) without the lock while Push/Pop take it.
Expect
go build ./..., go vet ./... and go test ./... are clean on all three platforms, and make build-gui produces a real GUI binary.
Activity