Skip to content

Commit

Permalink
1. fix dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
maranqz committed Aug 3, 2024
1 parent 4432926 commit 10f9c00
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
2 changes: 2 additions & 0 deletions drivers/pgxv4/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ exclude (
github.com/jackc/pgconn v1.14.3
golang.org/x/text v0.14.0
)

exclude golang.org/x/text v0.14.0
17 changes: 1 addition & 16 deletions drivers/pgxv5/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,4 @@ require (
github.com/pashagolub/pgxmock/v2 v2.12.0
github.com/stretchr/testify v1.8.2
go.uber.org/goleak v1.3.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
)
14 changes: 12 additions & 2 deletions sh/go.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,22 @@ golist() {
go list ./... | grep -v mock | grep -v internal/
}

verlte() {
printf '%s\n%s' "$1" "$2" | sort -C -V
}

gotest() {
cd $driver

go test -mod=readonly -race $(golist) "$@"
local go_mod_ver=$(sed -En 's/^go (.*)$/\1/p' go.mod)
local go_ver=$(go1.16 version | sed -n 's/.*go\([0-9.]*\).*/\1/p')

local exit_code=$?
local exit_code=0
if verlte $go_mod_ver $go_ver; then

go1.16 test -race -mod=readonly $(golist) "$@"
exit_code=$?
fi

cd $ROOT

Expand Down

0 comments on commit 10f9c00

Please sign in to comment.