feat(netxmocks): implement mocks for netxlite.Resolver (#398)
While there, make sure we require using &netxmocks.Dialer. Still part of https://github.com/ooni/probe/issues/1505
This commit is contained in:
parent
16aa8e5538
commit
c5dd9a68f1
9 changed files with 96 additions and 16 deletions
|
|
@ -16,8 +16,8 @@ type Dialer struct {
|
|||
}
|
||||
|
||||
// DialContext implements Dialer.DialContext.
|
||||
func (d Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) {
|
||||
func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) {
|
||||
return d.MockDialContext(ctx, network, address)
|
||||
}
|
||||
|
||||
var _ dialer = Dialer{}
|
||||
var _ dialer = &Dialer{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue