refactor: move i/e/n/errorx to i/errorsx (#416)

Still working towards https://github.com/ooni/probe/issues/1505
This commit is contained in:
Simone Basso 2021-07-01 16:34:36 +02:00 committed by GitHub
commit 72acd175a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 287 additions and 287 deletions

View file

@ -8,7 +8,7 @@ import (
"time"
"github.com/ooni/probe-cli/v3/internal/engine/legacy/netx/modelx"
"github.com/ooni/probe-cli/v3/internal/engine/netx/errorx"
"github.com/ooni/probe-cli/v3/internal/errorsx"
)
// UnderlyingDialer is the underlying dialer type.
@ -32,10 +32,10 @@ func (h ErrorWrapperTLSHandshaker) Handshake(
ctx context.Context, conn net.Conn, config *tls.Config,
) (net.Conn, tls.ConnectionState, error) {
tlsconn, state, err := h.TLSHandshaker.Handshake(ctx, conn, config)
err = errorx.SafeErrWrapperBuilder{
Classifier: errorx.ClassifyTLSFailure,
err = errorsx.SafeErrWrapperBuilder{
Classifier: errorsx.ClassifyTLSFailure,
Error: err,
Operation: errorx.TLSHandshakeOperation,
Operation: errorsx.TLSHandshakeOperation,
}.MaybeBuild()
return tlsconn, state, err
}