Skip to content

Commit 43a12a9

Browse files
committed
fix nil err global var to exclude fmt.Errorf
1 parent 9bda31b commit 43a12a9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/xcontext/cancel_with_error.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ package xcontext
33
import (
44
"context"
55
"errors"
6-
"fmt"
76
"sync"
87
"time"
98

109
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors"
1110
)
1211

13-
var errCancelWithNilError = fmt.Errorf("nil error: %w", context.Canceled)
12+
var errCancelWithNilError = cancelError{err: errors.New("cancel context with nil error")}
1413

1514
// CancelErrFunc use for cancel with wrap with specific error
1615
// if err == nil CancelErrFunc will panic for prevent

0 commit comments

Comments
 (0)