make- Format and build projectmake deps- Get all dependenciesmake test- Run all tests
go test -v ./...- Run all tests verboselygo test -v -run=TestName- Run a specific test by name
- Use
goimportsfor formatting (run viamake) - Follow standard Go formatting conventions
- Group imports: standard library first, then third-party
- Use PascalCase for exported types/methods, camelCase for variables
- Add comments for public API and complex logic
- Place related functionality in logically named files
- Use custom
Errortype with detailed context - Include error wrapping with
Unwrap()method - Return errors with proper context information (line, position)
- Write table-driven tests with clear input/output expectations
- Use package
tpl_testfor external testing perspective - Include detailed error messages (expected vs. actual)
- Test every exported function and error case
- Minimum Go version: 1.23.0
- External dependencies managed through go modules
- Use
errors.Is()anderrors.As()for error checking - Replace
interface{}withanytype alias - Replace type assertions with type switches where appropriate
- Use generics for type-safe operations
- Implement context cancellation handling for long operations
- Add proper docstring comments for exported functions and types
- Use log/slog for structured logging
- Add linting and static analysis tools