refactor(resolver): add CloseIdleConnections to SerialResolver (#502)
While there, generally convert more code to internal testing and to using pointer receivers as well. Part of https://github.com/ooni/probe/issues/1591.
This commit is contained in:
parent
1eb9e8c9b0
commit
b3c36b5c7f
7 changed files with 55 additions and 52 deletions
|
|
@ -22,7 +22,7 @@ const (
|
|||
)
|
||||
|
||||
// Encode implements Encoder.Encode
|
||||
func (e MiekgEncoder) Encode(domain string, qtype uint16, padding bool) ([]byte, error) {
|
||||
func (e *MiekgEncoder) Encode(domain string, qtype uint16, padding bool) ([]byte, error) {
|
||||
question := dns.Question{
|
||||
Name: dns.Fqdn(domain),
|
||||
Qtype: qtype,
|
||||
|
|
@ -49,4 +49,4 @@ func (e MiekgEncoder) Encode(domain string, qtype uint16, padding bool) ([]byte,
|
|||
return query.Pack()
|
||||
}
|
||||
|
||||
var _ Encoder = MiekgEncoder{}
|
||||
var _ Encoder = &MiekgEncoder{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue