MCPcopy
hub / github.com/jackc/pgx / newContextAlreadyDoneError

Function newContextAlreadyDoneError

pgconn/errors.go:226–228  ·  view source on GitHub ↗

newContextAlreadyDoneError double-wraps a context error in `contextAlreadyDoneError` and `errTimeout`.

(ctx context.Context)

Source from the content-addressed store, hash-verified

224
225// newContextAlreadyDoneError double-wraps a context error in `contextAlreadyDoneError` and `errTimeout`.
226func newContextAlreadyDoneError(ctx context.Context) (err error) {
227 return &errTimeout{&contextAlreadyDoneError{err: ctx.Err()}}
228}
229
230func redactPW(connString string) string {
231 if strings.HasPrefix(connString, "postgres://") || strings.HasPrefix(connString, "postgresql://") {

Callers 10

ReceiveMessageMethod · 0.85
PrepareMethod · 0.85
DeallocateMethod · 0.85
WaitForNotificationMethod · 0.85
ExecMethod · 0.85
execExtendedPrefixMethod · 0.85
CopyToMethod · 0.85
CopyFromMethod · 0.85
ExecBatchMethod · 0.85
StartPipelineMethod · 0.85

Calls 1

ErrMethod · 0.65

Tested by

no test coverage detected