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

Improve docs, allow for easier mocking of verify result, minor fixes #8

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

gzuidhof
Copy link
Contributor

No description provided.

@gzuidhof gzuidhof added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 16, 2024
@gzuidhof gzuidhof requested a review from mikemherron October 16, 2024 14:55
Copy link

@mikemherron mikemherron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@@ -39,15 +58,25 @@ func (r VerifyResult) ShouldAccept() bool {
if r.strict { // If Strict mode is enabled, we do not accept any captcha if there was an error.
return false
}
if errors.Is(r.err, ErrVerificationRequest) || errors.Is(r.err, ErrVerificationFailedDueToClientError) { // Failure to talk to Friendly Captcha verification API or client error (e.g. wrong API key)
if errors.Is(r.err, ErrVerificationRequest) ||

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd probably try break on the || here personally if the issue is long lines, I think the second errors.Is is hard to read now in that format. If the current version is added by golines then maybe it makes sense to keep as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is what golines made out of it.. Maybe there is some way to configure it, but for now I'll just follow its defaults

@gzuidhof gzuidhof merged commit 91df1cd into main Oct 16, 2024
1 check passed
@gzuidhof gzuidhof deleted the docs-and-mocking branch October 16, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants