Skip to content

Commit

Permalink
Remove dd-trace-go
Browse files Browse the repository at this point in the history
  • Loading branch information
winebarrel committed Oct 3, 2024
1 parent e22b314 commit 44e4fb8
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 194 deletions.
42 changes: 42 additions & 0 deletions driver_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package qg_test

import (
"context"
"database/sql/driver"

"github.com/jackc/pgx/v4/stdlib"
"github.com/kanmu/qg/v4"
)

var _ driver.Connector = &testConnector{}

type testConnector struct {
driver.Connector
Called *int
}

var _ qg.ConnWrapper = &testConnWrapper{}

type testConnWrapper struct {
*stdlib.Conn
*testConnector
}

func (cw *testConnWrapper) WrappedConn() driver.Conn {
*cw.Called++
return cw.Conn
}

func NewTestConnector(connector driver.Connector, counter *int) *testConnector {
return &testConnector{connector, counter}
}

func (c *testConnector) Connect(ctx context.Context) (driver.Conn, error) {
conn, err := c.Connector.Connect(ctx)

if err != nil {
return nil, err
}

return &testConnWrapper{conn.(*stdlib.Conn), c}, nil
}
28 changes: 4 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,12 @@ toolchain go1.22.8

require (
github.com/jackc/pgx/v4 v4.18.3
gopkg.in/DataDog/dd-trace-go.v1 v1.68.0
gopkg.in/guregu/null.v3 v3.0.2-0.20160228005316-41961cea0328
)

require (
github.com/DataDog/appsec-internal-go v1.7.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
github.com/DataDog/datadog-go/v5 v5.3.0 // indirect
github.com/DataDog/go-libddwaf/v3 v3.3.0 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
github.com/DataDog/sketches-go v1.4.5 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.6.0-alpha.5 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgio v1.0.0 // indirect
Expand All @@ -31,19 +20,10 @@ require (
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/lib/pq v1.10.3 // indirect
github.com/outcaste-io/ristretto v0.2.3 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
go.uber.org/atomic v1.11.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
Loading

0 comments on commit 44e4fb8

Please sign in to comment.