SAService Architect Back to designer
SAService ArchitectDocumentation
Code generation make golang-*

Go commands

Go targets generate schemas, synchronize modules, build services and validate Temporal Workflow determinism.

When to use

Use this reference when generating, reviewing or operating a Service Architect project.

Behavior

  • Generic make build/test/lint/gen targets invoke these automatically when Go components exist.
  • Service-local Makefiles expose direct build, run, test, lint and image targets.

Go workspace commands

Language-specific root targets.

CommandScopeDescription
make golang-buildWorkspace

Generate transport code, tidy modules and build all Go services.

make golang-testWorkspace

Run go test for all Go services.

make golang-lint / golang-lint-fixWorkspace

Run golangci-lint, optionally applying supported fixes.

make golang-fmt / fmt-go / fmt-protoWorkspace

Format Go and protobuf sources.

make golang-genWorkspace

Generate transports and synchronize module manifests.

make golang-codegenWorkspace

Generate protobuf/OpenAPI code without changing module manifests.

make golang-gen-proto / gen-protoWorkspace

Generate Go protobuf and gRPC bindings.

make golang-gen-openapi / gen-openapiWorkspace

Generate Go OpenAPI bindings.

make go-mod-tidyWorkspace

Run go mod tidy in all Go modules.

make go-mod-syncWorkspace

Replace local coordinates with published module versions after git-push.

make golang-workflowcheckWorkspace

Check Temporal Workflow implementations for deterministic Go behavior.

make golang-docker-buildWorkspace

Build service images entirely in Docker.

make golang-cleanWorkspace

Remove Go build artifacts.

make golang-toolsWorkspace

Install pinned buf, protoc plugins, golangci-lint, workflowcheck and OpenAPI tools.

make debug-<service-name>Service

Build an unoptimized Linux binary and restart the selected service with Delve on its generated port. <service-name> is derived from Service.name.

Standalone Go service commands

Targets available inside a generated Go service.

CommandScopeDescription
make buildService

Generate protobuf code and compile cmd/service/main.go.

make runService

Run with config/config.yaml and config/overrides.yaml.

make testService

Run go test ./....

make lint / lint-fixService

Run golangci-lint, optionally with --fix.

make gen-proto / fmt-protoService

Generate or format local protobuf files.

make service_build_linuxService

Build a static Linux service binary for a local image.

make service_build_linux_debugService

Build Linux with optimizations and inlining disabled for Delve.

make docker-buildService

Build the standalone production image.

make docker-build-localService

Build the source/debug-oriented local image.

make hooksService

Install generated pre-commit lint and pre-push test hooks.

make cleanService

Remove the service bin directory.

Go workflow

make golang-codegen
make golang-workflowcheck
make golang-test
make debug-<service-name>