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

context: support default values for Query methods #127

Merged
merged 3 commits into from May 30, 2022
Merged

Conversation

unknwon
Copy link
Member

@unknwon unknwon commented May 30, 2022

Describe the pull request

Allow passing an optional second argument for Query methods as the default value. Also start using go-mockgen to generate mocks for interface.

Link to the issue: fixes #125, fixes #77

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

Followup

  • Update docs on flamego.dev
  • Update docs on flamego.cn

@unknwon unknwon requested a review from a team May 30, 2022 05:29
@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #127 (1f1f1d1) into main (5c48ad2) will increase coverage by 1.85%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
+ Coverage   87.57%   89.42%   +1.85%     
==========================================
  Files          17       16       -1     
  Lines        1143     1135       -8     
==========================================
+ Hits         1001     1015      +14     
+ Misses        102       80      -22     
  Partials       40       40              

@unknwon unknwon merged commit fd701bd into main May 30, 2022
@unknwon unknwon deleted the jc/query-defaults branch May 30, 2022 11:31
@unknwon
Copy link
Member Author

unknwon commented May 30, 2022

https://github.com/flamego/flamego/releases/tag/v1.3.0 has been tagged for this merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

context: support setting default value for Query methods core: use go-mockgen for the Context
2 participants