fixup lint
Some checks failed
coverage / build (pull_request) Failing after 1m58s
lint / lint (pull_request) Successful in 3m31s
test / test (pull_request) Successful in 4m52s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-05-01 18:59:01 +03:00
parent 4e10570fb5
commit f1c323d991
3 changed files with 7 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ type wrapperConn struct {
conn driver.Conn
opts Options
ctx context.Context
span tracer.Span
//span tracer.Span
}
// Close implements driver.Conn Close
@@ -324,7 +324,7 @@ func (w *wrapperConn) Ping(ctx context.Context) error {
return pc.Close()
}
var nctx context.Context
var nctx context.Context //nolint: gosimple
nctx = ctx
/*
var span tracer.Span

View File

@@ -11,6 +11,7 @@ var (
// _ driver.Connector = (*wrapperDriver)(nil)
)
/*
type conn interface {
driver.Pinger
driver.Execer
@@ -21,6 +22,7 @@ type conn interface {
driver.ConnPrepareContext
driver.ConnBeginTx
}
*/
// wrapperDriver defines a wrapper for driver.Driver
type wrapperDriver struct {
@@ -36,7 +38,7 @@ func NewWrapper(d driver.Driver, opts ...Option) driver.Driver {
type wrappedConnector struct {
connector driver.Connector
name string
// name string
opts Options
ctx context.Context
}

View File

@@ -4,12 +4,14 @@ import (
"database/sql/driver"
)
/*
func wrapDriver(d driver.Driver, opts Options) driver.Driver {
if _, ok := d.(driver.DriverContext); ok {
return &wrapperDriver{driver: d, opts: opts}
}
return struct{ driver.Driver }{&wrapperDriver{driver: d, opts: opts}}
}
*/
// WrapConn allows an existing driver.Conn to be wrapped.
func WrapConn(c driver.Conn, opts ...Option) driver.Conn {