git clone https://github.com/ppiankov/pgpulse.git
cd pgpulse
make build
make test- Create a branch from
main - Make your changes
- Run
make verify(builds, tests with race detection, lints) - Commit with conventional commits:
feat:,fix:,docs:,test:,refactor:,chore: - Open a pull request against
main
- Go files:
snake_case.go - Packages: short single-word names
- Run
make fmtbefore committing - Run
make lintto check for issues
- Tests are mandatory for new code
- Use
-raceflag (already inmake test) - Test files go alongside source files
- Use the
Querierinterface for mocking database calls
cmd/pgpulse/ CLI entry point
internal/
cli/ Cobra commands
config/ Environment configuration
collector/ Poll loop and metric collectors
metrics/ Prometheus metric definitions
By contributing, you agree that your contributions will be licensed under the MIT License.