go_build
Build Go packages using cross-compilation, custom ldflags, and build tags. Supports target OS, architecture, and race detection.
Instructions
Build Go packages with cross-compilation and custom build flags support
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Additional arguments | |
| goos | No | Target operating system (linux, darwin, windows, etc.) | |
| race | No | Enable race condition detection | |
| tags | No | Build tags to include | |
| goarch | No | Target architecture (amd64, arm64, 386, etc.) | |
| output | No | Output binary path | |
| ldflags | No | Link flags to pass to the linker (e.g., -X main.version=1.0.0) | |
| package | No | Go package to build | |
| timeout | No | Command timeout in milliseconds | |
| verbose | No | Enable verbose output | |
| directory | No | Working directory for the command | |
| buildFlags | No | Additional build flags |