Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
chore: Add ShowByID filtering generation #3227
chore: Add ShowByID filtering generation #3227
Changes from 15 commits
f4d01dd
a7366ec
bc0fb66
5cb03d1
8f2a301
1599afb
ebeffac
dcbae83
151741b
93ab8ff
947902d
4633831
04bc3ce
aaf81f1
6370828
29b2ad8
b02da54
9cd65c3
9d51aa9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
operation.ObjectInterface
is being set here, because without itoperation.ObjectInterface.ObjectIdentifierKind()
can't be used before executing the template. It results in nil pointer dereference, same as forInterface.NameLowerCased()
.I wanted to use it before the template execution to invoke the filtering just by calling
{{ .WithFiltering }}
in the template.I'm open for discussion on this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with assigning it in the constructor (
newNoSqlOperation
in this case), it's not bad and imo could be added to other constructors that areInterface
methodsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using a variadic function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be done by formatting arguments in the create function (as discussed verbally). This way the identifier kind is removed from
newShowByIDFiltering()
function and there is no need for variadic anymore.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have an enum for
identifierKind
?