Skip to content

Commit c85b82d

Browse files
Update packages
1 parent 097f4ea commit c85b82d

File tree

5 files changed

+93
-558
lines changed

5 files changed

+93
-558
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
lint:
2-
golangci-lint run --go=1.18
2+
golangci-lint run
33

44
test:
55
go test ./...

database/container.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
type (
1515
PostgreSQLContainer struct {
1616
testcontainers.Container
17-
cfg PostgreSQLContainerConfig
17+
Config PostgreSQLContainerConfig
1818
mappedPort nat.Port
1919
}
2020

@@ -63,14 +63,14 @@ func NewPostgreSQLContainer(ctx context.Context, cfg PostgreSQLContainerConfig)
6363

6464
return &PostgreSQLContainer{
6565
Container: container,
66-
cfg: cfg,
66+
Config: cfg,
6767
mappedPort: mappedPort,
6868
}, nil
6969
}
7070

7171
// GetDSN -
7272
func (c PostgreSQLContainer) GetDSN() string {
73-
return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", c.cfg.User, c.cfg.Password, c.cfg.Host, c.mappedPort.Port(), c.cfg.Database)
73+
return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", c.Config.User, c.Config.Password, c.Config.Host, c.mappedPort.Port(), c.Config.Database)
7474
}
7575

7676
// MappedPort -

database/db_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ func (s *TestSuite) SetupSuite() {
8989

9090
s.db, err = newDatabase(ctx, s.typ, config.Database{
9191
Kind: config.DBKindPostgres,
92-
User: s.psqlContainer.cfg.User,
93-
Database: s.psqlContainer.cfg.Database,
94-
Password: s.psqlContainer.cfg.Password,
95-
Host: s.psqlContainer.cfg.Host,
92+
User: s.psqlContainer.Config.User,
93+
Database: s.psqlContainer.Config.Database,
94+
Password: s.psqlContainer.Config.Password,
95+
Host: s.psqlContainer.Config.Host,
9696
Port: s.psqlContainer.MappedPort().Int(),
9797
})
9898
s.Require().NoError(err)

go.mod

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
module github.com/dipdup-net/go-lib
22

3-
go 1.19
3+
go 1.20
44

55
require (
6-
github.com/dave/jennifer v1.4.1
6+
github.com/dave/jennifer v1.7.0
77
github.com/docker/go-connections v0.4.0
88
github.com/ebellocchia/go-base58 v0.1.0
99
github.com/go-pg/pg/v10 v10.10.6
10-
github.com/go-playground/validator/v10 v10.9.0
10+
github.com/go-playground/validator/v10 v10.15.0
1111
github.com/go-testfixtures/testfixtures/v3 v3.9.0
1212
github.com/golang/mock v1.6.0
13-
github.com/gorilla/websocket v1.4.2
14-
github.com/iancoleman/strcase v0.2.0
13+
github.com/gorilla/websocket v1.5.0
14+
github.com/iancoleman/strcase v0.3.0
1515
github.com/json-iterator/go v1.1.12
1616
github.com/lib/pq v1.10.9
1717
github.com/pkg/errors v0.9.1
18-
github.com/prometheus/client_golang v1.14.0
19-
github.com/rs/zerolog v1.29.1
20-
github.com/sergi/go-diff v1.2.0
18+
github.com/prometheus/client_golang v1.16.0
19+
github.com/rs/zerolog v1.30.0
20+
github.com/sergi/go-diff v1.3.1
2121
github.com/shopspring/decimal v1.3.1
2222
github.com/stretchr/testify v1.8.4
2323
github.com/testcontainers/testcontainers-go v0.22.0
2424
github.com/testcontainers/testcontainers-go/modules/postgres v0.22.0
25-
github.com/tidwall/gjson v1.12.1
25+
github.com/tidwall/gjson v1.16.0
2626
github.com/uptrace/bun v1.1.14
2727
github.com/uptrace/bun/dialect/pgdialect v1.1.14
2828
github.com/uptrace/bun/driver/pgdriver v1.1.14
2929
github.com/yhirose/go-peg v0.0.0-20210804202551-de25d6753cf1
30-
golang.org/x/crypto v0.9.0
31-
golang.org/x/text v0.9.0
30+
golang.org/x/crypto v0.12.0
31+
golang.org/x/text v0.12.0
3232
gopkg.in/yaml.v3 v3.0.1
33-
gorm.io/driver/mysql v1.2.1
34-
gorm.io/driver/postgres v1.2.3
35-
gorm.io/driver/sqlite v1.2.6
36-
gorm.io/gorm v1.22.4
33+
gorm.io/driver/mysql v1.5.1
34+
gorm.io/driver/postgres v1.5.2
35+
gorm.io/driver/sqlite v1.5.2
36+
gorm.io/gorm v1.25.3
3737
)
3838

3939
require (
@@ -52,31 +52,27 @@ require (
5252
github.com/docker/distribution v2.8.2+incompatible // indirect
5353
github.com/docker/docker v24.0.5+incompatible // indirect
5454
github.com/docker/go-units v0.5.0 // indirect
55+
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
5556
github.com/go-faster/city v1.0.1 // indirect
5657
github.com/go-faster/errors v0.6.1 // indirect
5758
github.com/go-pg/zerochecker v0.2.0 // indirect
58-
github.com/go-playground/locales v0.14.0 // indirect
59-
github.com/go-playground/universal-translator v0.18.0 // indirect
59+
github.com/go-playground/locales v0.14.1 // indirect
60+
github.com/go-playground/universal-translator v0.18.1 // indirect
6061
github.com/go-sql-driver/mysql v1.7.1 // indirect
6162
github.com/gogo/protobuf v1.3.2 // indirect
6263
github.com/golang/protobuf v1.5.3 // indirect
6364
github.com/google/uuid v1.3.0 // indirect
64-
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
65-
github.com/jackc/pgconn v1.14.0 // indirect
66-
github.com/jackc/pgio v1.0.0 // indirect
6765
github.com/jackc/pgpassfile v1.0.0 // indirect
68-
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
6966
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
70-
github.com/jackc/pgtype v1.14.0 // indirect
71-
github.com/jackc/pgx/v4 v4.18.1 // indirect
67+
github.com/jackc/pgx/v5 v5.4.3 // indirect
7268
github.com/jinzhu/inflection v1.0.0 // indirect
73-
github.com/jinzhu/now v1.1.3 // indirect
69+
github.com/jinzhu/now v1.1.5 // indirect
7470
github.com/klauspost/compress v1.16.5 // indirect
75-
github.com/leodido/go-urn v1.2.1 // indirect
71+
github.com/leodido/go-urn v1.2.4 // indirect
7672
github.com/magiconair/properties v1.8.7 // indirect
7773
github.com/mattn/go-colorable v0.1.13 // indirect
7874
github.com/mattn/go-isatty v0.0.19 // indirect
79-
github.com/mattn/go-sqlite3 v1.14.16 // indirect
75+
github.com/mattn/go-sqlite3 v1.14.17 // indirect
8076
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
8177
github.com/moby/patternmatcher v0.5.0 // indirect
8278
github.com/moby/sys/sequential v0.5.0 // indirect
@@ -91,12 +87,12 @@ require (
9187
github.com/pierrec/lz4/v4 v4.1.17 // indirect
9288
github.com/pmezard/go-difflib v1.0.0 // indirect
9389
github.com/prometheus/client_model v0.3.0 // indirect
94-
github.com/prometheus/common v0.37.0 // indirect
95-
github.com/prometheus/procfs v0.8.0 // indirect
90+
github.com/prometheus/common v0.42.0 // indirect
91+
github.com/prometheus/procfs v0.10.1 // indirect
9692
github.com/segmentio/asm v1.2.0 // indirect
9793
github.com/sirupsen/logrus v1.9.0 // indirect
9894
github.com/tidwall/match v1.1.1 // indirect
99-
github.com/tidwall/pretty v1.2.0 // indirect
95+
github.com/tidwall/pretty v1.2.1 // indirect
10096
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
10197
github.com/vmihailenco/bufpool v0.1.11 // indirect
10298
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
@@ -106,8 +102,8 @@ require (
106102
go.opentelemetry.io/otel/trace v1.15.0 // indirect
107103
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
108104
golang.org/x/mod v0.9.0 // indirect
109-
golang.org/x/net v0.10.0 // indirect
110-
golang.org/x/sys v0.8.0 // indirect
105+
golang.org/x/net v0.14.0 // indirect
106+
golang.org/x/sys v0.11.0 // indirect
111107
golang.org/x/tools v0.7.0 // indirect
112108
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
113109
google.golang.org/grpc v1.57.0 // indirect

0 commit comments

Comments
 (0)