Skip to content

Commit e681dfc

Browse files
authored
[-] fix govet linter warning (#219)
1 parent c579632 commit e681dfc

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ require (
1212
github.com/jackc/pgpassfile v1.0.0 // indirect
1313
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
1414
github.com/jackc/puddle/v2 v2.2.1 // indirect
15+
github.com/kr/text v0.2.0 // indirect
1516
github.com/pmezard/go-difflib v1.0.0 // indirect
17+
github.com/rogpeppe/go-internal v1.12.0 // indirect
1618
golang.org/x/crypto v0.23.0 // indirect
1719
golang.org/x/sync v0.7.0 // indirect
1820
golang.org/x/text v0.15.0 // indirect

go.sum

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
12
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
23
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
34
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -15,8 +16,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
1516
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
1617
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1718
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
18-
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
19-
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
19+
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
20+
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
2021
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
2122
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
2223
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=

pgxmock.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ package pgxmock
1212

1313
import (
1414
"context"
15+
"errors"
1516
"fmt"
1617
"reflect"
1718

@@ -577,7 +578,7 @@ func findExpectationFunc[ET expectationType[t], t any](c *pgxmock, method string
577578
if fulfilled == len(c.expectations) {
578579
msg = "all expectations were already fulfilled, " + msg
579580
}
580-
return nil, fmt.Errorf(msg)
581+
return nil, errors.New(msg)
581582
}
582583
defer expected.Unlock()
583584

0 commit comments

Comments
 (0)