Anybuild documentation
Go
Detect a Go module, compile its server entrypoint, and run the resulting binary.
Detection
A project is detected as Go when go.mod or go.sum exists. Anybuild searches common server files including main.go, server.go, serve.go, api.go, and web.go, including supported nested layouts.
Build output
The selected source file determines a normalized serve binary name. If discovery cannot find an entrypoint, set ANYBUILD_GO_BUILD_FILE explicitly.
Configuration
| Variable | Purpose | Example value |
|---|---|---|
ANYBUILD_GO_VERSION | Go package version; current default is 1.25.5. | 1.25.5 |
ANYBUILD_GO_BUILD_FILE | The Go server entry file to compile. | cmd/server/main.go |
ANYBUILD_GO_SERVE_BINARY | The output binary name to run. | server |