First off, thank you for considering contributing to WhereGo! 🎉
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Commit Messages
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/WhereGo.git - Add the upstream remote:
git remote add upstream https://github.com/gustavosett/WhereGo.git - Create a new branch:
git checkout -b feature/your-feature-name
- Go 1.24+
- Docker (optional, for container builds)
- Make (optional, for build automation)
# Build the binary
make build
# Run tests
make test
# Run linter
make lint
# Run all checks
make all# Run the API server
go run ./cmd/api
# Or use make
make runBefore creating bug reports, please check existing issues to avoid duplicates.
When creating a bug report, include:
- Clear title describing the issue
- Steps to reproduce the behavior
- Expected behavior vs actual behavior
- Environment details (OS, Go version, etc.)
- Logs or error messages if applicable
Feature requests are welcome! Please include:
- Use case - Why is this feature needed?
- Proposed solution - How do you envision it working?
- Alternatives considered - Other approaches you've thought of
- Look for issues labeled
good first issueorhelp wanted - Comment on the issue to let others know you're working on it
- Submit a PR when ready
- Update documentation if you're changing functionality
- Add tests for new features or bug fixes
- Ensure all tests pass:
make test - Ensure linter passes:
make lint - Update CHANGELOG.md with your changes
- Request review from maintainers
- My code follows the project's coding standards
- I have added tests that prove my fix/feature works
- All new and existing tests pass
- I have updated the documentation accordingly
- I have added an entry to CHANGELOG.md
- Follow Effective Go guidelines
- Use
gofmtfor formatting (automatic with most editors) - Follow Go Code Review Comments
- Use camelCase for unexported identifiers
- Use PascalCase for exported identifiers
- Use descriptive names over abbreviations
- Acronyms should be all caps:
HTTPHandler,IPAddress
// Good
if err != nil {
return fmt.Errorf("failed to parse IP: %w", err)
}
// Avoid
if err != nil {
return err // No context
}- Write table-driven tests when appropriate
- Use meaningful test names:
TestLookup_InvalidIP_ReturnsError - Aim for high test coverage on critical paths
Follow Conventional Commits:
<type>: <description>
[optional body]
[optional footer]
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Formatting, missing semicolons, etc.refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementtest: Adding missing testschore: Maintenance tasks
feat: add rate limiting endpoint
fix: handle IPv6 addresses correctly
docs: update API documentation with new endpoints
perf: optimize memory allocation in hot path
Feel free to open an issue with the question label or reach out to the maintainers.
Thank you for contributing! 🚀