1.7 KiB
1.7 KiB
Contributing
Thank you for your interest in contributing! This document outlines the process and requirements for contributing to this Go project.
Quick Start
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Ensure code meets quality standards (see below)
- Submit a pull request
Code Quality Requirements
Go version
We support Go version 1.25 and onwards.
Formatting with goimports
All Go code must be formatted using goimports
:
# Format all Go files
goimports -local git.maze.io/go/dpi -l -w .
# Install goimports if not available
go install golang.org/x/tools/cmd/goimports@latest
Linting with golangci-lint
All code must pass golangci-lint checks:
# Run linter
golangci-lint run
Checking your code
For convenience, all of the code checks can be run with a single command:
# Run all required code checks
make check
Install golangci-lint if not available
Please refer to the official documentation for help on installong golangci-lint
.
Development Workflow
Pre-commit Checklist
- Code formatted with
goimports
- All
golangci-lint
checks pass - Tests are updated/passing
- Documentation updated (if applicable)
Testing
Run the test suite before submitting:
go test ./...
Pull Request Guidelines
- Keep changes focused and atomic
- Update documentation for new features
- Ensure CI checks pass
- Respond to review feedback promptly
Getting Help
- Open an issue for bug reports or questions
- Use discussions for general questions
- Contact maintainers for sensitive issues
Thank you for contributing!