mirror of
https://github.com/dockersrc/go
synced 2026-06-24 14:01:08 -04:00
373136fead
When GO_PROD=1 is set at runtime, go build receives -trimpath and -ldflags="-s -w" to strip source paths, symbol tables, and DWARF debug info from compiled binaries. Applied to go build only — go test is unaffected so stack traces remain readable during development. Usage: docker run --env GO_PROD=1 --rm -v "$(pwd)":/app casjaysdev/go - rootfs/usr/local/bin/go-workflow: add BUILD_FLAGS array populated when GO_PROD=1; pass flags to go build step only; print mode notice when active rootfs/usr/local/bin/go-workflow