This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
make
- Build for local OS/archmake build
- Build for linux/amd64, windows/amd64make clean
- Remove build artifacts
make test
- Run all tests with coverageginkgo -focus="<test description>" ./tunnel
- Run a single testginkgo -r -noColor
- Run tests without colors
make lint
- Run gofmt check and go vetgolangci-lint run
- Run comprehensive linting checks
- Formatting: Use gofmt, tabs for indentation
- Imports: Standard library first, third-party after, group related imports
- Naming: PascalCase for exported, camelCase for unexported, snake_case for files
- Error Handling: Check errors immediately, return to caller or log with context
- Logging: Use log15 with structured key-value pairs
- Tests: Use Ginkgo BDD-style tests with Gomega assertions
- Blank Identifiers: Don't use unused blank identifiers like
var _ fmt.Formatter
- Go Version: Use
go 1.24
format in go.mod (notgo 1.24.0
)
- Create version.go with
make version
- Update CHANGELOG.md with
make changelog
- If you encounter linting errors with
golangci-lint run
, check for unused declarations - Go version in go.mod should be
go 1.24
(notgo 1.24.0
) - The application has no
-version
flag, check version in the generatedversion.go
file