Browse the docs

Go Getting Started

Use Go when the first project is a backend service, worker, platform-adjacent component, or library where explicit wiring and predictable runtime behavior matter.

This path starts with the workspace template, then moves into the Go framework primitives.

Pick the project shape

You need... Template What you get
An HTTP service go-server Service entry point, operational endpoints (/readyz, /version, /_/health), tests
A shared Go package go-library Go module, exported function, tests, workspace wiring

If you are starting from an empty directory, create the workspace and a go-server project in one command:

putnami init --extension go --project api

--template go-library creates a library instead. Run putnami init --extension go without --project to start with no project.

Then check and run it:

putnami test api
putnami serve api

Add a project

In a workspace that already declares @putnami/go, add a service:

putnami projects create orders --template go-server
putnami test orders
putnami serve orders

For a library:

putnami projects create domain --template go-library
putnami test domain

What to look at first

Start with the service skeleton, then add capabilities in this order:

  1. Overview for the module map and framework shape.
  2. HTTP & Middleware for routing, middleware, handlers, and responses.
  3. Plugins & Lifecycle for startup, shutdown, and capability ownership.
  4. Configuration and Dependency Injection before wiring spreads across package globals.
  5. Persistence and Testing when the service needs Postgres: the connection, SQL migrations, and tests against the database putnami test provides.
  6. Package & Docker to build the container image.
  7. Platform endpoints, Logging, and Telemetry before production.

Daily loop

putnami test api
putnami serve api
putnami lint,test,build --impacted

putnami serve keeps the Go project inside the same workspace workflow as TypeScript, Python, and tooling projects.

  • Go overview for the package map.
  • Extension for Go-specific build, test, serve, and packaging behavior.
  • CLI for project selection, impacted work, and caching.