-
-
Notifications
You must be signed in to change notification settings - Fork 205
Implementated global validation of domain strings #638
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
Conversation
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.
Thanks for the PR 😉
A few changes to be made though 🤔
JK. Forgot GitHub codespaces was a thing. |
I don't know why the linter is failing in GitHub Actions because it passes in the dev container. Anyway, ready for review. |
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.
Nice 👍 💯
Now, we need to add a check the domain isn't ""
for the providers actually using the domain parameter. Most of them do, but there are 2-3 exceptions (like duckdns, goip). So that would be edits in each of the provider subpackage within internal/provider/providers
I'm not sure what you're asking here. Could you explain it a different way. |
bed663a
to
6a6b1a8
Compare
We need to add a check in most providers that the domain is not empty For example in
add a case to check the domain is not empty: case p.domain == "":
return fmt.Errorf("%w", errors.ErrDomainNotSet) |
Should be good now. Please take a look @qdm12 |
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.
Thanks!
Positive is it does it in 3 lines for all providers except the two weird ones
Negative side is it it adds coupling in the code, but oh well that's fine this time 😉
Just rebase/fix the go.mod dependency diff and I'll merge, thanks! 🎖️
Co-authored-by: Quentin McGaw <[email protected]>
e2e86c4
to
0734391
Compare
… a need to add a check in every provider's individual package.
Should close #626 and provide a basic sanity check for all providers, agnostic of provider specific requirements.