diff --git a/internal/cmd/benchmark/bson.go b/internal/cmd/benchmark/bson.go index d79d423035..66911e2cdb 100644 --- a/internal/cmd/benchmark/bson.go +++ b/internal/cmd/benchmark/bson.go @@ -11,7 +11,7 @@ import ( "io/ioutil" "path/filepath" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) const ( diff --git a/internal/cmd/benchmark/bson_document.go b/internal/cmd/benchmark/bson_document.go index 12fda885f2..0a510ae5c8 100644 --- a/internal/cmd/benchmark/bson_document.go +++ b/internal/cmd/benchmark/bson_document.go @@ -10,7 +10,7 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func bsonDocumentEncoding(tm TimerManager, iters int, source string) error { diff --git a/internal/cmd/benchmark/bson_map.go b/internal/cmd/benchmark/bson_map.go index 6101172050..67a3259958 100644 --- a/internal/cmd/benchmark/bson_map.go +++ b/internal/cmd/benchmark/bson_map.go @@ -12,7 +12,7 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func bsonMapDecoding(tm TimerManager, iters int, dataSet string) error { diff --git a/internal/cmd/benchmark/bson_struct.go b/internal/cmd/benchmark/bson_struct.go index 91c07d728f..91a6502dde 100644 --- a/internal/cmd/benchmark/bson_struct.go +++ b/internal/cmd/benchmark/bson_struct.go @@ -11,7 +11,7 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func BSONFlatStructDecoding(_ context.Context, tm TimerManager, iters int) error { diff --git a/internal/cmd/benchmark/bson_types.go b/internal/cmd/benchmark/bson_types.go index dd806d4487..705649042e 100644 --- a/internal/cmd/benchmark/bson_types.go +++ b/internal/cmd/benchmark/bson_types.go @@ -7,7 +7,7 @@ package main import ( - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) type flatBSONTags struct { diff --git a/internal/cmd/benchmark/go.mod b/internal/cmd/benchmark/go.mod index b995379293..a0fa3aa115 100644 --- a/internal/cmd/benchmark/go.mod +++ b/internal/cmd/benchmark/go.mod @@ -2,15 +2,15 @@ module go.mongodb.go/mongo-driver/internal/cmd/benchmark go 1.18 -replace go.mongodb.org/mongo-driver => ../../../ +replace go.mongodb.org/mongo-driver/v2 => ../../../ // Note that the Go driver version is replaced with the local Go driver code by // the replace directive above. -require go.mongodb.org/mongo-driver v1.11.7 require ( github.com/montanaflynn/stats v0.7.1 github.com/stretchr/testify v1.9.0 + go.mongodb.org/mongo-driver/v2 v2.0.0-alpha2 ) require ( diff --git a/internal/cmd/benchmark/multi.go b/internal/cmd/benchmark/multi.go index c5c3f0f31f..26e6d0a6b1 100644 --- a/internal/cmd/benchmark/multi.go +++ b/internal/cmd/benchmark/multi.go @@ -10,7 +10,7 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func MultiFindMany(ctx context.Context, tm TimerManager, iters int) error { diff --git a/internal/cmd/benchmark/operation_test.go b/internal/cmd/benchmark/operation_test.go index 13f41d80c2..017f2f54f5 100644 --- a/internal/cmd/benchmark/operation_test.go +++ b/internal/cmd/benchmark/operation_test.go @@ -10,9 +10,9 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) var teststrings = []string{ diff --git a/internal/cmd/benchmark/single.go b/internal/cmd/benchmark/single.go index c0e87cfcef..eeb61070ee 100644 --- a/internal/cmd/benchmark/single.go +++ b/internal/cmd/benchmark/single.go @@ -13,10 +13,10 @@ import ( "os" "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" ) // LegacyHelloLowercase is the lowercase, legacy version of the hello command. diff --git a/internal/cmd/compilecheck/go.mod b/internal/cmd/compilecheck/go.mod index 9c8d6fe95b..6e1b34d080 100644 --- a/internal/cmd/compilecheck/go.mod +++ b/internal/cmd/compilecheck/go.mod @@ -6,7 +6,7 @@ replace go.mongodb.org/mongo-driver/v2 => ../../../ // Note that the Go driver version is replaced with the local Go driver code by // the replace directive above. -require go.mongodb.org/mongo-driver/v2 v2.0.0-alpha1 +require go.mongodb.org/mongo-driver/v2 v2.0.0-alpha2 require ( github.com/golang/snappy v0.0.4 // indirect diff --git a/internal/cmd/compilecheck/main.go b/internal/cmd/compilecheck/main.go index 49923a44f2..6a56997de2 100644 --- a/internal/cmd/compilecheck/main.go +++ b/internal/cmd/compilecheck/main.go @@ -9,9 +9,9 @@ package main import ( "fmt" - "go.mongodb.org/mongo-driver/bson/v2" - "go.mongodb.org/mongo-driver/mongo/options/v2" - "go.mongodb.org/mongo-driver/mongo/v2" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func main() { diff --git a/internal/cmd/faas/awslambda/mongodb/bootstrap.go b/internal/cmd/faas/awslambda/mongodb/bootstrap.go index b2fd77ddad..1d2fb18964 100644 --- a/internal/cmd/faas/awslambda/mongodb/bootstrap.go +++ b/internal/cmd/faas/awslambda/mongodb/bootstrap.go @@ -16,9 +16,9 @@ import ( "github.com/aws/aws-lambda-go/events" "github.com/aws/aws-lambda-go/lambda" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) const timeout = 60 * time.Second diff --git a/internal/cmd/faas/awslambda/mongodb/go.mod b/internal/cmd/faas/awslambda/mongodb/go.mod index ec45f7306f..20b776b61b 100644 --- a/internal/cmd/faas/awslambda/mongodb/go.mod +++ b/internal/cmd/faas/awslambda/mongodb/go.mod @@ -2,27 +2,24 @@ module go.mongodb.go/mongo-driver/internal/test/mongodb go 1.20 -replace go.mongodb.org/mongo-driver => ../../../../../ +replace go.mongodb.org/mongo-driver/v2 => ../../../../../ -require ( - github.com/aws/aws-lambda-go v1.41.0 +require github.com/aws/aws-lambda-go v1.41.0 - // Note that the Go driver version is replaced with the local Go driver code - // by the replace directive above. - go.mongodb.org/mongo-driver v1.11.7 -) +require go.mongodb.org/mongo-driver/v2 v2.0.0-00010101000000-000000000000 require ( - github.com/golang/snappy v0.0.1 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/klauspost/compress v1.13.6 // indirect github.com/stretchr/testify v1.8.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect - golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/text v0.14.0 // indirect ) replace gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.2.8 diff --git a/internal/cmd/faas/awslambda/mongodb/go.sum b/internal/cmd/faas/awslambda/mongodb/go.sum index 1de72e3b5b..b435c3a16c 100644 --- a/internal/cmd/faas/awslambda/mongodb/go.sum +++ b/internal/cmd/faas/awslambda/mongodb/go.sum @@ -1,13 +1,23 @@ github.com/aws/aws-lambda-go v1.41.0 h1:l/5fyVb6Ud9uYd411xdHZzSf2n86TakxzpvIoz7l+3Y= github.com/aws/aws-lambda-go v1.41.0/go.mod h1:jwFe2KmMsHmffA1X2R09hH6lFzJQxzI8qK17ewzbQMM= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -19,15 +29,16 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -39,11 +50,13 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=