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

@ -5,7 +5,7 @@ import (
"crypto/tls"
"github.com/lucas-clemente/quic-go"
"github.com/ooni/probe-cli/v3/internal/engine/netx/errorx"
"github.com/ooni/probe-cli/v3/internal/errorsx"
)
// ErrorWrapperDialer is a dialer that performs quic err wrapping
@ -18,10 +18,10 @@ func (d ErrorWrapperDialer) DialContext(
ctx context.Context, network string, host string,
tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error) {
sess, err := d.Dialer.DialContext(ctx, network, host, tlsCfg, cfg)
err = errorx.SafeErrWrapperBuilder{
Classifier: errorx.ClassifyQUICFailure,
err = errorsx.SafeErrWrapperBuilder{
Classifier: errorsx.ClassifyQUICFailure,
Error: err,
Operation: errorx.QUICHandshakeOperation,
Operation: errorsx.QUICHandshakeOperation,
}.MaybeBuild()
if err != nil {
return nil, err