File tree Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ require (
18
18
github.com/hashicorp/raft v1.7.3
19
19
github.com/hashicorp/raft-boltdb/v2 v2.3.1
20
20
github.com/hashicorp/serf v0.10.2
21
+ github.com/jackc/pgx/v5 v5.7.5
21
22
github.com/jinzhu/copier v0.4.0
22
23
github.com/jmoiron/sqlx v1.4.0
23
- github.com/lib/pq v1.10.9
24
24
github.com/panjf2000/ants/v2 v2.11.3
25
25
github.com/redis/go-redis/v9 v9.9.0
26
26
github.com/rs/xid v1.6.0
@@ -69,6 +69,9 @@ require (
69
69
github.com/hashicorp/go-msgpack/v2 v2.1.2 // indirect
70
70
github.com/hashicorp/go-multierror v1.1.1 // indirect
71
71
github.com/hashicorp/golang-lru v1.0.2 // indirect
72
+ github.com/jackc/pgpassfile v1.0.0 // indirect
73
+ github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
74
+ github.com/jackc/puddle/v2 v2.2.2 // indirect
72
75
github.com/klauspost/compress v1.17.9 // indirect
73
76
github.com/mattn/go-colorable v0.1.12 // indirect
74
77
github.com/mattn/go-isatty v0.0.14 // indirect
Original file line number Diff line number Diff line change @@ -170,6 +170,14 @@ github.com/hashicorp/raft-boltdb/v2 v2.3.1/go.mod h1:n4S+g43dXF1tqDT+yzcXHhXM6y7
170
170
github.com/hashicorp/serf v0.10.2 h1:m5IORhuNSjaxeljg5DeQVDlQyVkhRIjJDimbkCa8aAc =
171
171
github.com/hashicorp/serf v0.10.2 /go.mod h1:T1CmSGfSeGfnfNy/w0odXQUR1rfECGd2Qdsp84DjOiY =
172
172
github.com/inconshreveable/mousetrap v1.0.0 /go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8 =
173
+ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM =
174
+ github.com/jackc/pgpassfile v1.0.0 /go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg =
175
+ github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo =
176
+ github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 /go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM =
177
+ github.com/jackc/pgx/v5 v5.7.5 h1:JHGfMnQY+IEtGM63d+NGMjoRpysB2JBwDr5fsngwmJs =
178
+ github.com/jackc/pgx/v5 v5.7.5 /go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M =
179
+ github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo =
180
+ github.com/jackc/puddle/v2 v2.2.2 /go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4 =
173
181
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8 =
174
182
github.com/jinzhu/copier v0.4.0 /go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg =
175
183
github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o =
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ func (a *Auth) Provides(b byte) bool {
54
54
}
55
55
56
56
func (a * Auth ) Init (config any ) error {
57
- if _ , ok := config .(* Options ); config == nil || ( ! ok && config != nil ) {
57
+ if _ , ok := config .(* Options ); ! ok || config == nil {
58
58
return mqtt .ErrInvalidConfigType
59
59
}
60
60
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ func (a *Auth) Provides(b byte) bool {
72
72
}
73
73
74
74
func (a * Auth ) Init (config any ) error {
75
- if _ , ok := config .(* Options ); config == nil || ( ! ok && config != nil ) {
75
+ if _ , ok := config .(* Options ); ! ok || config == nil {
76
76
return mqtt .ErrInvalidConfigType
77
77
}
78
78
Original file line number Diff line number Diff line change 4
4
"bytes"
5
5
"fmt"
6
6
7
+ _ "github.com/jackc/pgx/v5/stdlib"
7
8
"github.com/jmoiron/sqlx"
8
- _ "github.com/lib/pq"
9
9
"github.com/wind-c/comqtt/v2/mqtt"
10
10
"github.com/wind-c/comqtt/v2/mqtt/hooks/auth"
11
11
"github.com/wind-c/comqtt/v2/mqtt/packets"
@@ -72,7 +72,7 @@ func (a *Auth) Provides(b byte) bool {
72
72
}
73
73
74
74
func (a * Auth ) Init (config any ) error {
75
- if _ , ok := config .(* Options ); config == nil || ( ! ok && config != nil ) {
75
+ if _ , ok := config .(* Options ); ! ok || config == nil {
76
76
return mqtt .ErrInvalidConfigType
77
77
}
78
78
You can’t perform that action at this time.
0 commit comments