refactor: move ErrorWrapperTLSHandshaker to errorsx (#418)

Part of https://github.com/ooni/probe/issues/1505
This commit is contained in:
Simone Basso 2021-07-01 18:00:09 +02:00 committed by GitHub
commit 863899469e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 84 additions and 50 deletions

View file

@ -38,6 +38,7 @@ import (
"github.com/ooni/probe-cli/v3/internal/engine/netx/resolver"
"github.com/ooni/probe-cli/v3/internal/engine/netx/tlsdialer"
"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"
)
@ -184,7 +185,7 @@ func NewTLSDialer(config Config) TLSDialer {
config.Dialer = NewDialer(config)
}
var h tlsHandshaker = &netxlite.TLSHandshakerConfigurable{}
h = tlsdialer.ErrorWrapperTLSHandshaker{TLSHandshaker: h}
h = &errorsx.ErrorWrapperTLSHandshaker{TLSHandshaker: h}
if config.Logger != nil {
h = &netxlite.TLSHandshakerLogger{Logger: config.Logger, TLSHandshaker: h}
}