Contributing
Development Setup
Section titled “Development Setup”Requirements: Go 1.26+
git clone https://github.com/larsartmann/go-atomic-write.gitcd go-atomic-writego mod downloadBuilding
Section titled “Building”go build ./...Testing
Section titled “Testing”# Run all testsgo test ./...
# With race detectorgo test -race ./...Linting
Section titled “Linting”Uses golangci-lint with ~100 linters at their strictest defaults. Configuration lives in .golangci.yml.
# Run all configured linters — MUST exit with 0 issues before merginggolangci-lint run ./...
# Auto-fix formatting/importsgolangci-lint run ./... --fixAll pull requests must pass:
go build ./...— compiles cleanlygo test -race ./...— tests pass with race detectiongo vet ./...— no vet warningsgolangci-lint run ./...— no lint issues
Code Style
Section titled “Code Style”- Standard
testingpackage — no testify or other test utilities t.Parallel()on most testst.TempDir()for filesystem isolation- Early returns over nested conditionals
- Strong types over runtime checks
- Single-letter variables trigger
varnamelen— use full words - Inline
if errtriggersnoinlineerr— assign first, then check
Adding Dependencies
Section titled “Adding Dependencies”Adding a new third-party import requires updating the depguard.rules.main.allow list in .golangci.yml.
Pull Requests
Section titled “Pull Requests”- Ensure all tests pass:
go test -race ./... - Ensure linting passes:
golangci-lint run ./... - Add tests for new functionality
- Keep changes focused and atomic
Releases and Deploys
Section titled “Releases and Deploys”Releases are cut by maintainers: lint gate (0 issues), CI green on master
before tagging (test+race, lint, windows/darwin cross-compile, govulncheck,
drift guard), [Unreleased] moved into a dated [X.Y.Z] CHANGELOG section
inside the tag commit, annotated tag, GitHub release marked latest, then
end-to-end verification on the module proxy and pkg.go.dev. Tags are never
re-tagged or deleted — the module proxy caches poisoned versions forever.
The website deploys automatically on every push to master that touches
website/**, CHANGELOG.md, or README.md. The full checklists live in the
repo’s CONTRIBUTING.md and AGENTS.md.