Thanks for considering contributing to Rigging! This is a focused Go library for type-safe configuration management.
Prerequisites: Go 1.21+
# Fork and clone
git clone https://github.com/Azhovan/rigging.git
cd rigging
# Run CI checks (what GitHub Actions runs)
make ci
# Or run individual checks
make test # race-enabled test suite
make fmtSimplicity: Rigging is intentionally minimal. New features must justify their complexity.
Zero Dependencies: The core package has no external dependencies. Keep it that way.
Type Safety: We leverage Go's type system. Avoid reflection where possible.
Clear Documentation: Code should be self-explanatory. Comments explain why, not what.
fix/validation-panic- Bug fixesfeat/etcd-source- New featuresrefactor/improve-error-message- Refactoringdocs/clarify-tags- Documentationperf/reduce-allocs- Performance
- All exported functions must have tests
- Keep coverage healthy; the current
make cigate fails below 70% total coverage - Use table-driven tests
- Test error paths, not just happy paths
func TestLoad_WithMissingRequiredField_ReturnsError(t *testing.T) {
// Clear, specific test names
}- Run
gofmt,go vetbefore committing - Keep functions under 50 lines when possible
- Avoid complex nested logic
- Use early returns to reduce nesting
- Package docs: Minimal. See
doc.gofor our style. - Exported types: One-line comment stating purpose.
- Complex logic: Brief inline comments explaining why.
Example:
// Loader loads configuration from multiple sources.
// Sources are processed in order (later override earlier).
type Loader[T any] struct { ... }- Bug fixes: Always welcome
- Test improvements: Increase coverage, add edge cases
- Performance: Reduce allocations, optimize hot paths
- Source implementations: etcd, Consul, Vault (separate packages)
- Documentation: Fix unclear docs, add examples
- Validation: New validators that are broadly useful
- File watching: fsnotify integration for sourcefile
- Breaking changes: Must have strong justification
- New core features: May increase complexity too much
- Dependencies: Core must stay dependency-free
- Open an issue first for significant changes
- Keep PRs small and focused
- Include tests
- Update relevant docs
- Ensure CI passes
PR Title Format:
fix: prevent panic in strict mode with nested structs
feat: add etcd source in sourceecrd package
docs: clarify oneof tag behavior
PR Description:
- What problem does this solve?
- How did you test it?
- Any breaking changes?
Rigging is designed for:
- Production use: Reliability over features
- Type safety: Compile-time guarantees where possible
- Explicit configuration: No magic, no surprises
- Minimal API surface: Easy to understand completely
We reject:
- Magic: Auto-discovery, reflection-heavy solutions
- Bloat: Features that serve narrow use cases
- Complexity: Clever code that's hard to maintain
Using Make (recommended):
make ci # Run all CI checks (fmt, vet, test, lint, coverage gate)
make test # Run race-enabled tests
make fmt # Format code
make vet # Run go vet
make lint # Run golangci-lint
make clean # Clean artifactsManual commands:
go test -race ./... # Tests
go vet ./... # Vet
gofmt -s -w . # Format- Questions: Open a discussion
- Bugs: Open an issue with minimal reproduction
- Security: Email maintainer directly (see README)
By contributing, you agree your code is licensed under MIT.
Keep it simple. Make it fast. Test everything.