File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 5
5
require (
6
6
github.com/go-playground/validator/v10 v10.4.1
7
7
github.com/stretchr/testify v1.6.1
8
- go.mongodb.org/mongo-driver v1.5 .1
8
+ go.mongodb.org/mongo-driver v1.7 .1
9
9
)
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM
103
103
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d /go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA =
104
104
go.mongodb.org/mongo-driver v1.5.1 h1:9nOVLGDfOaZ9R0tBumx/BcuqkbFpyTCU2r/Po7A2azI =
105
105
go.mongodb.org/mongo-driver v1.5.1 /go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw =
106
+ go.mongodb.org/mongo-driver v1.7.1 h1:jwqTeEM3x6L9xDXrCxN0Hbg7vdGfPBOTIkr0+/LYZDA =
107
+ go.mongodb.org/mongo-driver v1.7.1 /go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8 =
106
108
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 /go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4 =
107
109
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 /go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w =
108
110
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf /go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE =
Original file line number Diff line number Diff line change @@ -435,11 +435,11 @@ func TestQuery_Distinct(t *testing.T) {
435
435
err = cli .Find (context .Background (), filter2 ).Distinct ("age" , & res5 )
436
436
ast .EqualError (err , ErrQueryResultTypeInconsistent .Error ())
437
437
438
- var res6 [] int32
439
-
440
- err = cli .Find (context .Background (), filter2 ).Distinct ("" , & res6 )
441
- ast .NoError (err )
442
- ast .Equal (0 , len (res6 ))
438
+ // different behavior with different version of mongod, v4.4.0 return err and v4.0.19 return nil
439
+ //var res6 []int32
440
+ // err = cli.Find(context.Background(), filter2).Distinct("", &res6)
441
+ // ast.Error (err) // (Location40352) FieldPath cannot be constructed with empty string
442
+ // ast.Equal(0, len(res6))
443
443
444
444
var res7 []int32
445
445
filter3 := 1
You can’t perform that action at this time.
0 commit comments