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

feat: Blocklist Identifiers API #222

Merged
merged 1 commit into from
Feb 7, 2024
Merged

feat: Blocklist Identifiers API #222

merged 1 commit into from
Feb 7, 2024

Conversation

gkats
Copy link
Member

@gkats gkats commented Feb 7, 2024

Added support for the blocklist identifiers API. Supported operations are Create, Delete and List.

Added support for the blocklist identifiers API. Supported operations
are Create, Delete and List.
@gkats gkats requested a review from a team as a code owner February 7, 2024 11:39
@@ -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
Copy link
Member Author

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?

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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!

Copy link
Member Author

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.

Copy link
Contributor

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.

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.

2 participants