All skills
Skillintermediate
TPL-GO Developer Guide
TPL-GO Developer Guide — reference document from Claude Code knowledge pack.
Claude Code Knowledge Pack7/10/2026
Overview
TPL-GO Developer Guide
Build Commands
make- Format and build projectmake deps- Get all dependenciesmake test- Run all tests
Test Commands
go test -v ./...- Run all tests verboselygo test -v -run=TestName- Run a specific test by name
Code Style
- 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
Error Handling
- Use custom
Errortype with detailed context - Include error wrapping with
Unwrap()method - Return errors with proper context information (line, position)
Testing
- 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
Dependencies
- Minimum Go version: 1.23.0
- External dependencies managed through go modules
Modernization Notes
- 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