mirror of
https://github.com/cf-sonr/hway.git
synced 2026-01-12 03:09:14 +00:00
1.0 KiB
1.0 KiB
CLAUDE.md - Agent Guidelines for Hway Codebase
Build Commands
make deps- Install dependenciesmake build- Build all binariesmake test- Run all testsmake image- Build Docker imagego test -v ./path/to/package -run TestName- Run single test
Linting & Formatting
- Use standard Go formatting (
go fmt) - Follow standard import ordering: stdlib first, then external packages
- Run
go vet ./...before committing
Coding Conventions
- Use CamelCase for exported functions/variables, camelCase for private
- Create interfaces before implementations
- Type aliases should have clear documentation
- Use descriptive variable names that indicate purpose
- Constants should use PascalCase
Error Handling
- Always check errors and return them up the call stack
- Use
return nil, errpattern consistently - Only use panic for unrecoverable startup errors
- Include error descriptions in function documentation
Testing
- Write tests for new functionality
- Use table-driven tests where appropriate
- Mock external dependencies