build: use portable Go path detection in Makefile

Replace hardcoded /usr/local/go/bin/go with dynamic PATH lookup.
The previous hardcoded path failed on any system where Go is
installed elsewhere (e.g., /usr/bin/go, ~/go/bin/go).

Uses conditional assignment (GO ?=) so users can still override
with GO=/custom/path make build when needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
teernisse
2026-02-23 09:40:03 -05:00
parent 74c9905dbf
commit a386d95959

View File

@@ -1,4 +1,4 @@
GO := /usr/local/go/bin/go GO ?= $(shell command -v go)
BIN := cburn BIN := cburn
.PHONY: build install lint test test-race bench fuzz clean .PHONY: build install lint test test-race bench fuzz clean