3 files changed,
1 insertions(+),
16 deletions(-)
Author:
Smirnov Oleksandr
ss2316544@gmail.com
Committed by:
GitHub
noreply@github.com
Committed at:
2025-03-29 14:30:45 +0200
Parent:
fe55012
jump to
| M | go.mod |
| M | go.sum |
| M | internal/store/psqlutil/psqlutil.go |
M
go.mod
··· 8 8 github.com/golang-jwt/jwt/v5 v5.2.1 9 9 github.com/golang-migrate/migrate/v4 v4.18.2 10 10 github.com/henvic/pgq v0.0.3 11 - github.com/jackc/pgx-gofrs-uuid v0.0.0-20230224015001-1d428863c2e2 12 11 github.com/jackc/pgx/v5 v5.7.2 13 12 github.com/mailgun/mailgun-go/v4 v4.22.2 14 13 github.com/nats-io/nats.go v1.39.1
M
go.sum
··· 154 154 github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= 155 155 github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= 156 156 github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= 157 -github.com/jackc/pgx-gofrs-uuid v0.0.0-20230224015001-1d428863c2e2 h1:QWdhlQz98hUe1xmjADOl2mr8ERLrOqj0KWLdkrnNsRQ= 158 -github.com/jackc/pgx-gofrs-uuid v0.0.0-20230224015001-1d428863c2e2/go.mod h1:Ti7pyNDU/UpXKmBTeFgxTvzYDM9xHLiYKMsLdt4b9cg= 159 157 github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= 160 158 github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= 161 159 github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
M
internal/store/psqlutil/psqlutil.go
··· 4 4 "context" 5 5 "errors" 6 6 7 - pgxuuid "github.com/jackc/pgx-gofrs-uuid" 8 - "github.com/jackc/pgx/v5" 9 7 "github.com/jackc/pgx/v5/pgconn" 10 8 "github.com/jackc/pgx/v5/pgxpool" 11 9 ) ··· 13 11 type DB struct{ *pgxpool.Pool } 14 12 15 13 func Connect(ctx context.Context, dsn string) (*DB, error) { 16 - dbConf, err := pgxpool.ParseConfig(dsn) 17 - if err != nil { 18 - return nil, err 19 - } 20 - 21 - dbConf.AfterConnect = func(_ context.Context, c *pgx.Conn) error { 22 - pgxuuid.Register(c.TypeMap()) 23 - return nil 24 - } 25 - 26 - db, err := pgxpool.NewWithConfig(ctx, dbConf) 14 + db, err := pgxpool.New(ctx, dsn) 27 15 if err != nil { 28 16 return nil, err 29 17 }