Export selector and DNS response via Verification#42
Export selector and DNS response via Verification#42kmille wants to merge 4 commits intoemersion:masterfrom
Conversation
This makes debugging much easier. It can be difficult to debug issues as the verification struct does not contain all information used for the verification like the public key or the selector. If you change the DNS record and don't know if DNS is still cached further information can help.
| Expiration time.Time | ||
|
|
||
| // The QueryResult holds the parsed DNS response | ||
| QueryResult *queryResult |
There was a problem hiding this comment.
We can't add a public field with a private type like this.
There was a problem hiding this comment.
I don't understand what you mean. Why is it private and why can't we export it?
There was a problem hiding this comment.
It's unexported, because it begins with a lowercase letter.
There was a problem hiding this comment.
But QueryResult starts with a big letter? Can you explain what you mean? Thanks.
There was a problem hiding this comment.
The field QueryResult is exported, the type *queryResult isn't.
There was a problem hiding this comment.
ah I see. I'm still not sure about you're opinion. Should I make the type public or do you think that's a bad idea in general?
|
Can't we add more context to the error messages instead? |
|
I want to write a mail tester like mail-tester.com. If something fails, I want to show the used public keys, selector, etc. as debug infos. I think for this use case a more verbose error message is not sufficient. Having access to all fields makes it easier. |
|
Hey, |
This makes debugging much easier. It can be difficult to debug issues
as the verification struct does not contain all information used for
the verification like the public key or the selector. If you
change the DNS record and don't know if DNS is still cached further
information can help.
Thank you for writing this library!
kmille