Thank you for your interest in contributing to gf!
The most valuable contributions are new pattern files for the examples/ directory. If you have a grep pattern you use regularly that others might find useful, please share it!
Bug fixes and improvements to the codebase are also welcome.
# Clone the repository
git clone https://github.com/geeknik/gf
cd gf
# Run tests
make test
# Build locally
make build
# Install locally
make install- Fork the repository
- Create a branch for your changes:
git checkout -b feature/my-changes - Make your changes and add tests if applicable
- Run tests:
make test - Run the linter:
make lint - Commit your changes with a clear message
- Push to your fork:
git push origin feature/my-changes - Open a pull request
Pattern files should be placed in the examples/ directory with a descriptive name in kebab-case.json format.
Example pattern file format:
{
"flags": "-HnrE",
"pattern": "your-pattern-here"
}Or with multiple patterns:
{
"flags": "-HnrE",
"patterns": [
"pattern-one",
"pattern-two"
]
}- Follow standard Go formatting (
go fmt) - Run
go vetbefore committing - Add tests for new functionality
- Keep changes minimal and focused
By contributing, you agree that your contributions will be licensed under the MIT License.