refactor: move dialer's errorwrapper in i/errorsx (#417)
Part of https://github.com/ooni/probe/issues/1505
This commit is contained in:
parent
72acd175a0
commit
ceefcaf45e
4 changed files with 31 additions and 26 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"net/url"
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/trace"
|
||||
"github.com/ooni/probe-cli/v3/internal/errorsx"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
||||
)
|
||||
|
||||
|
|
@ -69,7 +70,7 @@ type Config struct {
|
|||
// New creates a new Dialer from the specified config and resolver.
|
||||
func New(config *Config, resolver Resolver) Dialer {
|
||||
var d Dialer = netxlite.DefaultDialer
|
||||
d = &errorWrapperDialer{Dialer: d}
|
||||
d = &errorsx.ErrorWrapperDialer{Dialer: d}
|
||||
if config.Logger != nil {
|
||||
d = &netxlite.DialerLogger{Dialer: d, Logger: config.Logger}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue