-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: Blocklist Identifiers API #222
Conversation
Added support for the blocklist identifiers API. Supported operations are Create, Delete and List.
@@ -1,6 +1,6 @@ | |||
// Code generated by "gen"; DO NOT EDIT. | |||
// This file is meant to be re-generated in place and/or deleted at any time. | |||
// Last generated at 2024-02-06 13:00:04.900202362 +0000 UTC | |||
// Last generated at 2024-02-07 11:36:32.720909014 +0000 UTC |
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 wonder if we can make the generation smarter and avoid diffs like this one.
One solution would be to get rid of the timestamp here. Truth is we probably don't need it.
Another solution would be to run go generate
only for a selected package.
I'm thinking of removing the timestamp, since it's easier to run go generate
for the whole project.
Any thoughts on this?
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 think it's fine to remove, although Github automatically hides the diff by default for auto-generated files.
@@ -1,6 +1,6 @@ | |||
// Code generated by "gen"; DO NOT EDIT. | |||
// This file is meant to be re-generated in place and/or deleted at any time. | |||
// Last generated at 2024-02-06 13:00:04.900202362 +0000 UTC | |||
// Last generated at 2024-02-07 11:36:32.720909014 +0000 UTC |
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 think it's fine to remove, although Github automatically hides the diff by default for auto-generated files.
req := clerk.NewAPIRequest(http.MethodGet, fmt.Sprintf("%s?paginated=true", path)) | ||
list := &clerk.BlocklistIdentifierList{} | ||
err := c.Backend.Call(ctx, req, list) | ||
return list, err |
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.
❓ Just a reminder that we don't return nil
here, not sure where we landed on this!
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 don't think we landed anywhere, but it's possible that I might have missed us making a decision.
Personally, I think that any return value cannot be trusted in case there's an error, so I'm fine with anything.
Let me know if you'd prefer changing the return type to always be nil
when there's an error and I can do it.
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.
All good, no objection, it's true that values must be discarded. Only benefit I could see is that we could avoid using pointers overall.
Added support for the blocklist identifiers API. Supported operations are Create, Delete and List.