- Go 1.25+
- golangci-lint
- GNU Make
git clone https://github.com/ppiankov/logtap.git
cd logtap
make deps
make build
make testTests are mandatory for all new code.
- Coverage target: >85% per package
- Race detection: always (
make testuses-race) - Deterministic only: no flaky or time-dependent tests
- Test location: alongside source files (
foo_test.gonext tofoo.go)
Run tests:
make test # all tests with race detection
go test -cover ./internal/recv/ # single package with coverageFormat: type: concise imperative statement
- Lowercase after colon, no trailing period
- Max 72 characters
- Types:
feat,fix,docs,test,refactor,chore,perf,ci,build
Examples:
feat: add user authentication
fix: handle nil user in payment checkout
test: add stress tests for file rotator
Optional body (separated by blank line) explains why, not what.
- One logical change per PR
- All tests pass (
make test) - Lint clean (
make lint) - Include tests for new functionality
- Keep PRs small and focused — easier to review, faster to merge
- Comments explain "why", not "what"
- No magic numbers — name and document constants
- Early returns over deep nesting
- No decorative comments or unnecessary abstractions
- Run
make fmtbefore committing
cmd/logtap/ CLI entry point (Cobra subcommands)
cmd/logtap-forwarder/ Sidecar binary
internal/ All business logic (recv, rotate, k8s, forward, etc.)
docs/ Design docs and work orders
By contributing, you agree that your contributions will be licensed under the MIT License.