Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Add code example of how to use custom filters #268

Merged
merged 1 commit into from
Jul 8, 2024
Merged

[Doc] Add code example of how to use custom filters #268

merged 1 commit into from
Jul 8, 2024

Conversation

zenpk
Copy link
Contributor

@zenpk zenpk commented Jul 7, 2024

Description

Yesterday I tried to use a custom filter but couldn't get it to work. I looked in the documentation and example code but found no information about this, so I read the source code and figured out that I had to call the FilterRule method. Upon reflection, this design makes sense and feels natural but I think it would be good to have an example in the readme.

Changes Made

  1. Add a FilterRule call in the readme's Add Custom Filter section.
  2. Uncomment a line in the example code, making the usage of the custom filter more obvious.

@inhere inhere merged commit 82f315e into gookit:master Jul 8, 2024
11 of 13 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9827826902

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.68%

Totals Coverage Status
Change from base Build 8995471607: 0.0%
Covered Lines: 2912
Relevant Lines: 3012

💛 - Coveralls

@zenpk zenpk deleted the doc_improvement branch July 8, 2024 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants