@codama/renderers-go
v2.0.0
Published
Renders Golang clients for your programs
Maintainers
Readme
Codama ➤ Renderers ➤ Go
This package generates Go clients from your Codama IDLs.
Installation
pnpm install @codama/renderers-goUsage
Add the following script to your Codama configuration file.
{
"scripts": {
"go": {
"from": "@codama/renderers-go",
"args": ["clients/go/generated"]
}
}
}Contributing
Prerequisites
Setup
git clone https://github.com/codama-idl/renderers-go.git
cd renderers-go
pnpm installBuild
pnpm buildTest
Run all tests (type checks, unit tests, e2e tests, export tests):
pnpm testOr run individual test suites:
pnpm test:types # Type checking
pnpm test:unit # Unit tests
pnpm test:e2e # End-to-end tests (generates Go code and runs `go build`)E2E workflow
The e2e tests generate Go clients from sample IDLs and verify they compile. To manually test a specific project:
pnpm build
node e2e/generate.cjs <project> # e.g. dummy, system, memo
cd e2e/<project> && go build ./...Available e2e projects: dummy, system, memo.
Lint
pnpm lint # Check for issues
pnpm lint:fix # Auto-fix issues