diff --git a/README.md b/README.md index e160118d55..b96dbd60d7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@
@@ -44,9 +44,9 @@ import ( "context" "time" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" ) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -64,7 +64,7 @@ defer func() { }() ``` -For more advanced configuration and authentication, see the [documentation for mongo.Connect](https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/mongo#Connect). +For more advanced configuration and authentication, see the [documentation for mongo.Connect](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Connect). Calling `Connect` does not block for server discovery. If you wish to know if a MongoDB server has been found and connected to, use the `Ping` method: @@ -90,7 +90,7 @@ res, err := collection.InsertOne(ctx, bson.D{{"name", "pi"}, {"value", 3.14159}} id := res.InsertedID ``` -To use `bson.D`, you will need to add `"go.mongodb.org/mongo-driver/v2/bson"` to your imports. +To use `bson.D`, you will need to add `"go.mongodb.org/mongo-driver/bson"` to your imports. Your import statement should now look like this: @@ -100,10 +100,10 @@ import ( "log" "time" - "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/mongo/readpref" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" ) ``` diff --git a/benchmark/bson.go b/benchmark/bson.go index 2e1dc45a73..2992fb3fad 100644 --- a/benchmark/bson.go +++ b/benchmark/bson.go @@ -11,7 +11,7 @@ import ( "io/ioutil" "path/filepath" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) const ( diff --git a/benchmark/bson_document.go b/benchmark/bson_document.go index b531e59eab..da25714e22 100644 --- a/benchmark/bson_document.go +++ b/benchmark/bson_document.go @@ -10,7 +10,7 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) func bsonDocumentEncoding(tm TimerManager, iters int, source string) error { diff --git a/benchmark/bson_map.go b/benchmark/bson_map.go index 4b5b423749..8fd56ee81e 100644 --- a/benchmark/bson_map.go +++ b/benchmark/bson_map.go @@ -11,7 +11,7 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) func bsonMapDecoding(tm TimerManager, iters int, dataSet string) error { diff --git a/benchmark/bson_struct.go b/benchmark/bson_struct.go index 5143f43609..3fec93cc2c 100644 --- a/benchmark/bson_struct.go +++ b/benchmark/bson_struct.go @@ -10,7 +10,7 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) func BSONFlatStructDecoding(_ context.Context, tm TimerManager, iters int) error { diff --git a/benchmark/bson_types.go b/benchmark/bson_types.go index fa6fe2b8f7..9d46cbcb03 100644 --- a/benchmark/bson_types.go +++ b/benchmark/bson_types.go @@ -6,7 +6,7 @@ package benchmark -import "go.mongodb.org/mongo-driver/v2/bson/primitive" +import "go.mongodb.org/mongo-driver/bson/primitive" type flatBSONTags struct { ID primitive.ObjectID `bson:"_id"` diff --git a/benchmark/harness.go b/benchmark/harness.go index bbbf95f53c..0c93879a86 100644 --- a/benchmark/harness.go +++ b/benchmark/harness.go @@ -4,14 +4,14 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package benchmark // import "go.mongodb.org/mongo-driver/v2/benchmark" +package benchmark // import "go.mongodb.org/mongo-driver/benchmark" import ( "context" "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/require" ) const ( diff --git a/benchmark/multi.go b/benchmark/multi.go index 2b0fbbd938..e003420718 100644 --- a/benchmark/multi.go +++ b/benchmark/multi.go @@ -10,7 +10,7 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) func MultiFindMany(ctx context.Context, tm TimerManager, iters int) error { diff --git a/benchmark/operation_test.go b/benchmark/operation_test.go index a826d999a5..147934273f 100644 --- a/benchmark/operation_test.go +++ b/benchmark/operation_test.go @@ -10,9 +10,9 @@ import ( "context" "testing" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) var teststrings = []string{ diff --git a/benchmark/single.go b/benchmark/single.go index 05ba351c26..da286c7e02 100644 --- a/benchmark/single.go +++ b/benchmark/single.go @@ -10,11 +10,11 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) const ( diff --git a/bson/bson.go b/bson/bson.go index d5aa85c13d..a0d8185826 100644 --- a/bson/bson.go +++ b/bson/bson.go @@ -7,10 +7,10 @@ // Based on gopkg.in/mgo.v2/bson by Gustavo Niemeyer // See THIRD-PARTY-NOTICES for original license terms. -package bson // import "go.mongodb.org/mongo-driver/v2/bson" +package bson // import "go.mongodb.org/mongo-driver/bson" import ( - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/primitive" ) // Zeroer allows custom struct types to implement a report of zero diff --git a/bson/bson_corpus_spec_test.go b/bson/bson_corpus_spec_test.go index 424609d953..8a27b06272 100644 --- a/bson/bson_corpus_spec_test.go +++ b/bson/bson_corpus_spec_test.go @@ -22,9 +22,9 @@ import ( "unicode/utf8" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" ) type testCase struct { diff --git a/bson/bson_test.go b/bson/bson_test.go index 6139ca86d1..e2c1bf9e8b 100644 --- a/bson/bson_test.go +++ b/bson/bson_test.go @@ -16,11 +16,11 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func noerr(t *testing.T, err error) { diff --git a/bson/bsoncodec/array_codec.go b/bson/bsoncodec/array_codec.go index f9f3ff8494..6ca8d9ad6c 100644 --- a/bson/bsoncodec/array_codec.go +++ b/bson/bsoncodec/array_codec.go @@ -9,8 +9,8 @@ package bsoncodec import ( "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // ArrayCodec is the Codec used for bsoncore.Array values. diff --git a/bson/bsoncodec/bsoncodec.go b/bson/bsoncodec/bsoncodec.go index ca13f00c01..0693bd432f 100644 --- a/bson/bsoncodec/bsoncodec.go +++ b/bson/bsoncodec/bsoncodec.go @@ -4,16 +4,16 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package bsoncodec // import "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" +package bsoncodec // import "go.mongodb.org/mongo-driver/bson/bsoncodec" import ( "fmt" "reflect" "strings" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) var ( diff --git a/bson/bsoncodec/bsoncodec_test.go b/bson/bsoncodec/bsoncodec_test.go index 2be96eca8d..2051b08539 100644 --- a/bson/bsoncodec/bsoncodec_test.go +++ b/bson/bsoncodec/bsoncodec_test.go @@ -12,9 +12,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) func ExampleValueEncoder() { diff --git a/bson/bsoncodec/byte_slice_codec.go b/bson/bsoncodec/byte_slice_codec.go index 1da3d555da..dde3e76815 100644 --- a/bson/bsoncodec/byte_slice_codec.go +++ b/bson/bsoncodec/byte_slice_codec.go @@ -10,9 +10,9 @@ import ( "fmt" "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // ByteSliceCodec is the Codec used for []byte values. diff --git a/bson/bsoncodec/cond_addr_codec.go b/bson/bsoncodec/cond_addr_codec.go index 16a96121c9..cb8180f25c 100644 --- a/bson/bsoncodec/cond_addr_codec.go +++ b/bson/bsoncodec/cond_addr_codec.go @@ -9,7 +9,7 @@ package bsoncodec import ( "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsonrw" ) // condAddrEncoder is the encoder used when a pointer to the encoding value has an encoder. diff --git a/bson/bsoncodec/cond_addr_codec_test.go b/bson/bsoncodec/cond_addr_codec_test.go index 049d6c1aef..4d308f9172 100644 --- a/bson/bsoncodec/cond_addr_codec_test.go +++ b/bson/bsoncodec/cond_addr_codec_test.go @@ -10,9 +10,9 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestCondAddrCodec(t *testing.T) { diff --git a/bson/bsoncodec/default_value_decoders.go b/bson/bsoncodec/default_value_decoders.go index f4993eb5fa..e479c3585b 100644 --- a/bson/bsoncodec/default_value_decoders.go +++ b/bson/bsoncodec/default_value_decoders.go @@ -16,10 +16,10 @@ import ( "strconv" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var ( diff --git a/bson/bsoncodec/default_value_decoders_test.go b/bson/bsoncodec/default_value_decoders_test.go index e3c09cb026..bac92e04f8 100644 --- a/bson/bsoncodec/default_value_decoders_test.go +++ b/bson/bsoncodec/default_value_decoders_test.go @@ -19,12 +19,12 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var ( diff --git a/bson/bsoncodec/default_value_encoders.go b/bson/bsoncodec/default_value_encoders.go index 784ccfd20f..4ab14a668c 100644 --- a/bson/bsoncodec/default_value_encoders.go +++ b/bson/bsoncodec/default_value_encoders.go @@ -16,10 +16,10 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var defaultValueEncoders DefaultValueEncoders diff --git a/bson/bsoncodec/default_value_encoders_test.go b/bson/bsoncodec/default_value_encoders_test.go index c456b98df3..0cb35a1ae2 100644 --- a/bson/bsoncodec/default_value_encoders_test.go +++ b/bson/bsoncodec/default_value_encoders_test.go @@ -18,11 +18,11 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) type myInterface interface { diff --git a/bson/bsoncodec/empty_interface_codec.go b/bson/bsoncodec/empty_interface_codec.go index 8dd27cc8a3..94f7dcf1eb 100644 --- a/bson/bsoncodec/empty_interface_codec.go +++ b/bson/bsoncodec/empty_interface_codec.go @@ -9,10 +9,10 @@ package bsoncodec import ( "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // EmptyInterfaceCodec is the Codec used for interface{} values. diff --git a/bson/bsoncodec/map_codec.go b/bson/bsoncodec/map_codec.go index c820ea1f15..325c1738ab 100644 --- a/bson/bsoncodec/map_codec.go +++ b/bson/bsoncodec/map_codec.go @@ -12,9 +12,9 @@ import ( "reflect" "strconv" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) var defaultMapCodec = NewMapCodec() diff --git a/bson/bsoncodec/pointer_codec.go b/bson/bsoncodec/pointer_codec.go index 6e445a7604..e5923230b0 100644 --- a/bson/bsoncodec/pointer_codec.go +++ b/bson/bsoncodec/pointer_codec.go @@ -9,8 +9,8 @@ package bsoncodec import ( "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) var _ ValueEncoder = &PointerCodec{} diff --git a/bson/bsoncodec/registry.go b/bson/bsoncodec/registry.go index b698e8de6b..f309ee2b39 100644 --- a/bson/bsoncodec/registry.go +++ b/bson/bsoncodec/registry.go @@ -12,7 +12,7 @@ import ( "reflect" "sync" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // ErrNilType is returned when nil is passed to either LookupEncoder or LookupDecoder. diff --git a/bson/bsoncodec/registry_examples_test.go b/bson/bsoncodec/registry_examples_test.go index 4b44ddbc2a..9dc72bd503 100644 --- a/bson/bsoncodec/registry_examples_test.go +++ b/bson/bsoncodec/registry_examples_test.go @@ -11,10 +11,10 @@ import ( "math" "reflect" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) func ExampleRegistry_customEncoder() { diff --git a/bson/bsoncodec/registry_test.go b/bson/bsoncodec/registry_test.go index bfee222853..d09f32be5e 100644 --- a/bson/bsoncodec/registry_test.go +++ b/bson/bsoncodec/registry_test.go @@ -11,9 +11,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestRegistryBuilder(t *testing.T) { diff --git a/bson/bsoncodec/slice_codec.go b/bson/bsoncodec/slice_codec.go index 465ecd6ec6..a43daf005f 100644 --- a/bson/bsoncodec/slice_codec.go +++ b/bson/bsoncodec/slice_codec.go @@ -10,10 +10,10 @@ import ( "fmt" "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) var defaultSliceCodec = NewSliceCodec() diff --git a/bson/bsoncodec/string_codec.go b/bson/bsoncodec/string_codec.go index 56d663483e..ff931b7253 100644 --- a/bson/bsoncodec/string_codec.go +++ b/bson/bsoncodec/string_codec.go @@ -10,9 +10,9 @@ import ( "fmt" "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // StringCodec is the Codec used for string values. diff --git a/bson/bsoncodec/string_codec_test.go b/bson/bsoncodec/string_codec_test.go index 76921a8df2..4e544f4727 100644 --- a/bson/bsoncodec/string_codec_test.go +++ b/bson/bsoncodec/string_codec_test.go @@ -10,11 +10,11 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestStringCodec(t *testing.T) { diff --git a/bson/bsoncodec/struct_codec.go b/bson/bsoncodec/struct_codec.go index d9a8f98c77..4cde0a4d6b 100644 --- a/bson/bsoncodec/struct_codec.go +++ b/bson/bsoncodec/struct_codec.go @@ -15,9 +15,9 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // DecodeError represents an error that occurs when unmarshalling BSON bytes into a native Go type. diff --git a/bson/bsoncodec/struct_codec_test.go b/bson/bsoncodec/struct_codec_test.go index 2517782782..573b374b14 100644 --- a/bson/bsoncodec/struct_codec_test.go +++ b/bson/bsoncodec/struct_codec_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) var _ Zeroer = zeroer{} diff --git a/bson/bsoncodec/time_codec.go b/bson/bsoncodec/time_codec.go index 81c26c2262..7b005a9958 100644 --- a/bson/bsoncodec/time_codec.go +++ b/bson/bsoncodec/time_codec.go @@ -11,10 +11,10 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) const ( diff --git a/bson/bsoncodec/time_codec_test.go b/bson/bsoncodec/time_codec_test.go index b675d9ab14..3bb9f51ea7 100644 --- a/bson/bsoncodec/time_codec_test.go +++ b/bson/bsoncodec/time_codec_test.go @@ -11,11 +11,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestTimeCodec(t *testing.T) { diff --git a/bson/bsoncodec/types.go b/bson/bsoncodec/types.go index 8caf1c4798..6ade17b7d3 100644 --- a/bson/bsoncodec/types.go +++ b/bson/bsoncodec/types.go @@ -12,8 +12,8 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var tBool = reflect.TypeOf(false) diff --git a/bson/bsoncodec/uint_codec.go b/bson/bsoncodec/uint_codec.go index b0f5eb01d8..7eb1069050 100644 --- a/bson/bsoncodec/uint_codec.go +++ b/bson/bsoncodec/uint_codec.go @@ -11,9 +11,9 @@ import ( "math" "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // UIntCodec is the Codec used for uint values. diff --git a/bson/bsonrw/bsonrwtest/bsonrwtest.go b/bson/bsonrw/bsonrwtest/bsonrwtest.go index 7d9f848d50..b28cd7f23b 100644 --- a/bson/bsonrw/bsonrwtest/bsonrwtest.go +++ b/bson/bsonrw/bsonrwtest/bsonrwtest.go @@ -5,15 +5,15 @@ // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 // Package bsonrwtest provides utilities for testing the "bson/bsonrw" package. -package bsonrwtest // import "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" +package bsonrwtest // import "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var _ bsonrw.ValueReader = (*ValueReaderWriter)(nil) diff --git a/bson/bsonrw/copier.go b/bson/bsonrw/copier.go index 2e33917028..c146d02e58 100644 --- a/bson/bsonrw/copier.go +++ b/bson/bsonrw/copier.go @@ -10,9 +10,9 @@ import ( "fmt" "io" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // Copier is a type that allows copying between ValueReaders, ValueWriters, and diff --git a/bson/bsonrw/copier_test.go b/bson/bsonrw/copier_test.go index e35e9ea233..c57235cb56 100644 --- a/bson/bsonrw/copier_test.go +++ b/bson/bsonrw/copier_test.go @@ -12,9 +12,9 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestCopier(t *testing.T) { diff --git a/bson/bsonrw/doc.go b/bson/bsonrw/doc.go index 795ab10977..750b0d2af5 100644 --- a/bson/bsonrw/doc.go +++ b/bson/bsonrw/doc.go @@ -6,4 +6,4 @@ // Package bsonrw contains abstractions for reading and writing // BSON and BSON like types from sources. -package bsonrw // import "go.mongodb.org/mongo-driver/v2/bson/bsonrw" +package bsonrw // import "go.mongodb.org/mongo-driver/bson/bsonrw" diff --git a/bson/bsonrw/extjson_parser.go b/bson/bsonrw/extjson_parser.go index da63101dec..54c76bf746 100644 --- a/bson/bsonrw/extjson_parser.go +++ b/bson/bsonrw/extjson_parser.go @@ -14,7 +14,7 @@ import ( "io" "strings" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) const maxNestingDepth = 200 diff --git a/bson/bsonrw/extjson_parser_test.go b/bson/bsonrw/extjson_parser_test.go index 79d6edd4bf..6808b14174 100644 --- a/bson/bsonrw/extjson_parser_test.go +++ b/bson/bsonrw/extjson_parser_test.go @@ -12,7 +12,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) var ( diff --git a/bson/bsonrw/extjson_reader.go b/bson/bsonrw/extjson_reader.go index c5805bf3eb..2aca37a91f 100644 --- a/bson/bsonrw/extjson_reader.go +++ b/bson/bsonrw/extjson_reader.go @@ -11,8 +11,8 @@ import ( "io" "sync" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // ExtJSONValueReaderPool is a pool for ValueReaders that read ExtJSON. diff --git a/bson/bsonrw/extjson_reader_test.go b/bson/bsonrw/extjson_reader_test.go index fbe0071128..8a9f0cc24d 100644 --- a/bson/bsonrw/extjson_reader_test.go +++ b/bson/bsonrw/extjson_reader_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) func TestExtJSONReader(t *testing.T) { diff --git a/bson/bsonrw/extjson_wrappers.go b/bson/bsonrw/extjson_wrappers.go index 8e1868eff3..9695704246 100644 --- a/bson/bsonrw/extjson_wrappers.go +++ b/bson/bsonrw/extjson_wrappers.go @@ -14,8 +14,8 @@ import ( "strconv" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) func wrapperKeyBSONType(key string) bsontype.Type { diff --git a/bson/bsonrw/extjson_writer.go b/bson/bsonrw/extjson_writer.go index a9a3fdb2fc..bb9303167c 100644 --- a/bson/bsonrw/extjson_writer.go +++ b/bson/bsonrw/extjson_writer.go @@ -19,7 +19,7 @@ import ( "time" "unicode/utf8" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/primitive" ) // ExtJSONValueWriterPool is a pool for ExtJSON ValueWriters. diff --git a/bson/bsonrw/extjson_writer_test.go b/bson/bsonrw/extjson_writer_test.go index d8b1c0fdff..43c339f362 100644 --- a/bson/bsonrw/extjson_writer_test.go +++ b/bson/bsonrw/extjson_writer_test.go @@ -13,8 +13,8 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) func TestExtJSONValueWriter(t *testing.T) { diff --git a/bson/bsonrw/reader.go b/bson/bsonrw/reader.go index 7aa14f9c1b..324b10b616 100644 --- a/bson/bsonrw/reader.go +++ b/bson/bsonrw/reader.go @@ -7,8 +7,8 @@ package bsonrw import ( - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // ArrayReader is implemented by types that allow reading values from a BSON diff --git a/bson/bsonrw/value_reader.go b/bson/bsonrw/value_reader.go index 69a2bf560e..a242bb57cf 100644 --- a/bson/bsonrw/value_reader.go +++ b/bson/bsonrw/value_reader.go @@ -15,8 +15,8 @@ import ( "math" "sync" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) var _ ValueReader = (*valueReader)(nil) diff --git a/bson/bsonrw/value_reader_test.go b/bson/bsonrw/value_reader_test.go index ea3e69ef4a..1716eb54c4 100644 --- a/bson/bsonrw/value_reader_test.go +++ b/bson/bsonrw/value_reader_test.go @@ -14,9 +14,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestValueReader(t *testing.T) { diff --git a/bson/bsonrw/value_reader_writer_test.go b/bson/bsonrw/value_reader_writer_test.go index 0696308b36..0f5d3a53dd 100644 --- a/bson/bsonrw/value_reader_writer_test.go +++ b/bson/bsonrw/value_reader_writer_test.go @@ -9,9 +9,9 @@ package bsonrw import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) type VRWInvoked byte diff --git a/bson/bsonrw/value_writer.go b/bson/bsonrw/value_writer.go index 084973bfc6..311518a80d 100644 --- a/bson/bsonrw/value_writer.go +++ b/bson/bsonrw/value_writer.go @@ -15,9 +15,9 @@ import ( "strings" "sync" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var _ ValueWriter = (*valueWriter)(nil) diff --git a/bson/bsonrw/value_writer_test.go b/bson/bsonrw/value_writer_test.go index 33322525be..100cd267e0 100644 --- a/bson/bsonrw/value_writer_test.go +++ b/bson/bsonrw/value_writer_test.go @@ -16,9 +16,9 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestNewBSONValueWriter(t *testing.T) { diff --git a/bson/bsonrw/writer.go b/bson/bsonrw/writer.go index fb91d3e9b8..628f452932 100644 --- a/bson/bsonrw/writer.go +++ b/bson/bsonrw/writer.go @@ -7,8 +7,8 @@ package bsonrw import ( - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // ArrayWriter is the interface used to create a BSON or BSON adjacent array. diff --git a/bson/bsontype/bsontype.go b/bson/bsontype/bsontype.go index cc65c94ddd..255d9909e3 100644 --- a/bson/bsontype/bsontype.go +++ b/bson/bsontype/bsontype.go @@ -6,7 +6,7 @@ // Package bsontype is a utility package that contains types for each BSON type and the // a stringifier for the Type to enable easier debugging when working with BSON. -package bsontype // import "go.mongodb.org/mongo-driver/v2/bson/bsontype" +package bsontype // import "go.mongodb.org/mongo-driver/bson/bsontype" // BSON element types as described in https://bsonspec.org/spec.html. // diff --git a/bson/decoder.go b/bson/decoder.go index a8837f9282..eac74cd399 100644 --- a/bson/decoder.go +++ b/bson/decoder.go @@ -12,8 +12,8 @@ import ( "reflect" "sync" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" ) // ErrDecodeToNil is the error returned when trying to decode to a nil value diff --git a/bson/decoder_example_test.go b/bson/decoder_example_test.go index b51e317b12..a59d995972 100644 --- a/bson/decoder_example_test.go +++ b/bson/decoder_example_test.go @@ -11,8 +11,8 @@ import ( "fmt" "io" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsonrw" ) func ExampleDecoder() { diff --git a/bson/decoder_test.go b/bson/decoder_test.go index 107524b725..c91f4e0491 100644 --- a/bson/decoder_test.go +++ b/bson/decoder_test.go @@ -14,13 +14,13 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestBasicDecode(t *testing.T) { diff --git a/bson/encoder.go b/bson/encoder.go index e635971d27..0be2a97fbc 100644 --- a/bson/encoder.go +++ b/bson/encoder.go @@ -11,8 +11,8 @@ import ( "reflect" "sync" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" ) // This pool is used to keep the allocations of Encoders down. This is only used for the Marshal* diff --git a/bson/encoder_example_test.go b/bson/encoder_example_test.go index 4b5c926d8c..054c6497ec 100644 --- a/bson/encoder_example_test.go +++ b/bson/encoder_example_test.go @@ -11,8 +11,8 @@ import ( "fmt" "io" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsonrw" ) func ExampleEncoder() { diff --git a/bson/encoder_test.go b/bson/encoder_test.go index 4d62b08f1d..9458b8d06e 100644 --- a/bson/encoder_test.go +++ b/bson/encoder_test.go @@ -12,13 +12,13 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestBasicEncode(t *testing.T) { diff --git a/bson/example_test.go b/bson/example_test.go index 5b5a429701..a534de9cf9 100644 --- a/bson/example_test.go +++ b/bson/example_test.go @@ -10,7 +10,7 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) // This example uses Raw to skip parsing a nested document in a BSON message. diff --git a/bson/extjson_prose_test.go b/bson/extjson_prose_test.go index 309105cf8f..704cc82894 100644 --- a/bson/extjson_prose_test.go +++ b/bson/extjson_prose_test.go @@ -10,8 +10,8 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestExtJSON(t *testing.T) { diff --git a/bson/marshal.go b/bson/marshal.go index 6682c52bcd..17ce6697e0 100644 --- a/bson/marshal.go +++ b/bson/marshal.go @@ -11,9 +11,9 @@ import ( "encoding/json" "sync" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) const defaultDstCap = 256 diff --git a/bson/marshal_test.go b/bson/marshal_test.go index 9d4bee00ec..54b27dfcf1 100644 --- a/bson/marshal_test.go +++ b/bson/marshal_test.go @@ -15,12 +15,12 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var tInt32 = reflect.TypeOf(int32(0)) diff --git a/bson/marshal_value_cases_test.go b/bson/marshal_value_cases_test.go index 2727cfcba0..a889cc5845 100644 --- a/bson/marshal_value_cases_test.go +++ b/bson/marshal_value_cases_test.go @@ -10,10 +10,10 @@ import ( "io" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // helper type for testing MarshalValue that implements io.Reader diff --git a/bson/marshal_value_test.go b/bson/marshal_value_test.go index 692b0e70c2..cfc273f0de 100644 --- a/bson/marshal_value_test.go +++ b/bson/marshal_value_test.go @@ -10,9 +10,9 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestMarshalValue(t *testing.T) { diff --git a/bson/marshaling_cases_test.go b/bson/marshaling_cases_test.go index 6e9ee3bc37..4ed95d6759 100644 --- a/bson/marshaling_cases_test.go +++ b/bson/marshaling_cases_test.go @@ -7,7 +7,7 @@ package bson import ( - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsoncodec" ) type marshalingTestCase struct { diff --git a/bson/mgocompat/bson_test.go b/bson/mgocompat/bson_test.go index 5e4836e249..9b4495dcc3 100644 --- a/bson/mgocompat/bson_test.go +++ b/bson/mgocompat/bson_test.go @@ -20,12 +20,12 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" ) // Wrap up the document elements contained in data, prepending the int32 diff --git a/bson/mgocompat/registry.go b/bson/mgocompat/registry.go index 5c2ee85fb0..fc051f466d 100644 --- a/bson/mgocompat/registry.go +++ b/bson/mgocompat/registry.go @@ -11,10 +11,10 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonoptions" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonoptions" + "go.mongodb.org/mongo-driver/bson/bsontype" ) var ( diff --git a/bson/mgocompat/setter_getter.go b/bson/mgocompat/setter_getter.go index a7ea912d0f..e9c9cae834 100644 --- a/bson/mgocompat/setter_getter.go +++ b/bson/mgocompat/setter_getter.go @@ -10,9 +10,9 @@ import ( "errors" "reflect" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" ) // Setter interface: a value implementing the bson.Setter interface will receive the BSON diff --git a/bson/primitive/decimal_test.go b/bson/primitive/decimal_test.go index deef88f031..e67e11265b 100644 --- a/bson/primitive/decimal_test.go +++ b/bson/primitive/decimal_test.go @@ -12,8 +12,8 @@ import ( "math/big" "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" ) type bigIntTestCase struct { diff --git a/bson/primitive/objectid_test.go b/bson/primitive/objectid_test.go index 8d58a4570a..36f64a2b9a 100644 --- a/bson/primitive/objectid_test.go +++ b/bson/primitive/objectid_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" ) func TestString(t *testing.T) { diff --git a/bson/primitive/primitive.go b/bson/primitive/primitive.go index 1d06d0e8e6..65f4fbb949 100644 --- a/bson/primitive/primitive.go +++ b/bson/primitive/primitive.go @@ -6,7 +6,7 @@ // Package primitive contains types similar to Go primitives for BSON types that do not have direct // Go primitive representations. -package primitive // import "go.mongodb.org/mongo-driver/v2/bson/primitive" +package primitive // import "go.mongodb.org/mongo-driver/bson/primitive" import ( "bytes" diff --git a/bson/primitive/primitive_test.go b/bson/primitive/primitive_test.go index 76dc4e2722..821d651ae4 100644 --- a/bson/primitive/primitive_test.go +++ b/bson/primitive/primitive_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" ) // The same interface as bsoncodec.Zeroer implemented for tests. diff --git a/bson/primitive_codecs.go b/bson/primitive_codecs.go index 5978b2302d..ff32a87a79 100644 --- a/bson/primitive_codecs.go +++ b/bson/primitive_codecs.go @@ -11,8 +11,8 @@ import ( "fmt" "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" ) var tRawValue = reflect.TypeOf(RawValue{}) diff --git a/bson/primitive_codecs_test.go b/bson/primitive_codecs_test.go index 7be8e1b58a..466f135e83 100644 --- a/bson/primitive_codecs_test.go +++ b/bson/primitive_codecs_test.go @@ -17,12 +17,12 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func bytesFromDoc(doc interface{}) []byte { diff --git a/bson/raw.go b/bson/raw.go index a11b3306d6..fe990a1771 100644 --- a/bson/raw.go +++ b/bson/raw.go @@ -10,7 +10,7 @@ import ( "errors" "io" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // ErrNilReader indicates that an operation was attempted on a nil bson.Reader. diff --git a/bson/raw_element.go b/bson/raw_element.go index 75a00350e3..8ce13c2cc7 100644 --- a/bson/raw_element.go +++ b/bson/raw_element.go @@ -7,7 +7,7 @@ package bson import ( - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // RawElement is a raw encoded BSON document or array element. diff --git a/bson/raw_test.go b/bson/raw_test.go index 2d056b423a..02c9f63136 100644 --- a/bson/raw_test.go +++ b/bson/raw_test.go @@ -15,9 +15,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func ExampleRaw_Validate() { diff --git a/bson/raw_value.go b/bson/raw_value.go index 0f96517649..4d1bfb3160 100644 --- a/bson/raw_value.go +++ b/bson/raw_value.go @@ -13,11 +13,11 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // ErrNilContext is returned when the provided DecodeContext is nil. diff --git a/bson/raw_value_test.go b/bson/raw_value_test.go index 45d95d46da..87f08c4a55 100644 --- a/bson/raw_value_test.go +++ b/bson/raw_value_test.go @@ -11,10 +11,10 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestRawValue(t *testing.T) { diff --git a/bson/registry.go b/bson/registry.go index 0fcbf9b839..b5b0f35687 100644 --- a/bson/registry.go +++ b/bson/registry.go @@ -7,7 +7,7 @@ package bson import ( - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsoncodec" ) // DefaultRegistry is the default bsoncodec.Registry. It contains the default codecs and the diff --git a/bson/truncation_test.go b/bson/truncation_test.go index 9e3d061b12..c8ba759a33 100644 --- a/bson/truncation_test.go +++ b/bson/truncation_test.go @@ -9,8 +9,8 @@ package bson import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/internal/assert" ) type inputArgs struct { diff --git a/bson/types.go b/bson/types.go index c611a3072b..ef39812467 100644 --- a/bson/types.go +++ b/bson/types.go @@ -7,7 +7,7 @@ package bson import ( - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // BSON element types as described in https://bsonspec.org/spec.html. diff --git a/bson/unmarshal.go b/bson/unmarshal.go index f2ec490833..66da17ee01 100644 --- a/bson/unmarshal.go +++ b/bson/unmarshal.go @@ -9,9 +9,9 @@ package bson import ( "bytes" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // Unmarshaler is the interface implemented by types that can unmarshal a BSON diff --git a/bson/unmarshal_test.go b/bson/unmarshal_test.go index 5c77bc6d1c..11452a895c 100644 --- a/bson/unmarshal_test.go +++ b/bson/unmarshal_test.go @@ -11,11 +11,11 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestUnmarshal(t *testing.T) { diff --git a/bson/unmarshal_value_test.go b/bson/unmarshal_value_test.go index b85af945a8..ef91da1659 100644 --- a/bson/unmarshal_value_test.go +++ b/bson/unmarshal_value_test.go @@ -11,10 +11,10 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestUnmarshalValue(t *testing.T) { diff --git a/bson/unmarshaling_cases_test.go b/bson/unmarshaling_cases_test.go index c50085e6e9..37d9ded318 100644 --- a/bson/unmarshaling_cases_test.go +++ b/bson/unmarshaling_cases_test.go @@ -9,8 +9,8 @@ package bson import ( "reflect" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" ) type unmarshalingTestCase struct { diff --git a/cmd/build-oss-fuzz-corpus/main.go b/cmd/build-oss-fuzz-corpus/main.go index 547103c805..4dc014b5aa 100644 --- a/cmd/build-oss-fuzz-corpus/main.go +++ b/cmd/build-oss-fuzz-corpus/main.go @@ -19,7 +19,7 @@ import ( "path" "path/filepath" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) const dataDir = "testdata/bson-corpus/" diff --git a/cmd/testatlas/main.go b/cmd/testatlas/main.go index 8cdf2c0a02..fa50d7cde7 100644 --- a/cmd/testatlas/main.go +++ b/cmd/testatlas/main.go @@ -12,10 +12,10 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func main() { diff --git a/cmd/testaws/main.go b/cmd/testaws/main.go index 0d305feb6a..dc767e5add 100644 --- a/cmd/testaws/main.go +++ b/cmd/testaws/main.go @@ -11,9 +11,9 @@ import ( "fmt" "os" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func main() { diff --git a/cmd/testentauth/main.go b/cmd/testentauth/main.go index a7851c2ee7..9bcea33294 100644 --- a/cmd/testentauth/main.go +++ b/cmd/testentauth/main.go @@ -12,9 +12,9 @@ import ( "os" "time" - "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" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" ) func main() { diff --git a/cmd/testkms/main.go b/cmd/testkms/main.go index 34e5600f87..bc8f6b6dfe 100644 --- a/cmd/testkms/main.go +++ b/cmd/testkms/main.go @@ -12,10 +12,10 @@ import ( "os" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) var datakeyopts = map[string]primitive.M{ diff --git a/docs/common-issues.md b/docs/common-issues.md index 904f2073dc..0a68fc64f6 100644 --- a/docs/common-issues.md +++ b/docs/common-issues.md @@ -4,7 +4,7 @@ These are fixes or information for common issues encountered by Go Driver users. ## `WriteXXX` can only write while positioned on a Element or Value but is positioned on a TopLevel -The [`bson.Marshal`](https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/bson#Marshal) function requires a parameter that can be decoded into a BSON Document, i.e. a [`primitive.D`](https://github.com/mongodb/mongo-go-driver/v2/blob/master/bson/bson.go#L31). Therefore the error message +The [`bson.Marshal`](https://pkg.go.dev/go.mongodb.org/mongo-driver/bson#Marshal) function requires a parameter that can be decoded into a BSON Document, i.e. a [`primitive.D`](https://github.com/mongodb/mongo-go-driver/v2/blob/master/bson/bson.go#L31). Therefore the error message > `WriteXXX` can only write while positioned on a Element or Value but is positioned on a TopLevel @@ -14,7 +14,7 @@ occurs when the input to `bson.Marshal` is something *other* than a BSON Documen - `WriteNull`: the input into `bson.Marshal` is null - `WriteInt32`: the input into `bson.Marshal` is an integer -Many CRUD operations in the Go Driver use `bson.Marshal` under the hood, so it's possible to encounter this particular error without directly attempting to encode data. For example, when using a sort on [`FindOneAndUpdate`](https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/mongo#Collection.FindOneAndUpdate) this error can occur when not properly initializing the `sort` variable: +Many CRUD operations in the Go Driver use `bson.Marshal` under the hood, so it's possible to encounter this particular error without directly attempting to encode data. For example, when using a sort on [`FindOneAndUpdate`](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Collection.FindOneAndUpdate) this error can occur when not properly initializing the `sort` variable: ```go var sort bson.D // this is nil and will result in a WriteNull error @@ -62,4 +62,4 @@ That error can be caused by a number of issues. The error message intentionally - Incorrect username. - Incorrect authentication database (i.e. [authSource](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource)). -If you encounter an `AuthenticationFailed` error like the one above, check that the username and password in your [connection string](https://www.mongodb.com/docs/manual/reference/connection-string/) or [SetAuth](https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/mongo/options#ClientOptions.SetAuth) call are correct. In most cases, [authSource](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource) does not need to be specified unless you are using a non-default authentication database (the default is "admin"). +If you encounter an `AuthenticationFailed` error like the one above, check that the username and password in your [connection string](https://www.mongodb.com/docs/manual/reference/connection-string/) or [SetAuth](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo/options#ClientOptions.SetAuth) call are correct. In most cases, [authSource](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource) does not need to be specified unless you are using a non-default authentication database (the default is "admin"). diff --git a/event/examples_test.go b/event/examples_test.go index e387a94e39..5041006568 100644 --- a/event/examples_test.go +++ b/event/examples_test.go @@ -10,10 +10,10 @@ import ( "context" "log" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) // Event examples diff --git a/event/monitoring.go b/event/monitoring.go index 4c6878e188..53d1caf2e3 100644 --- a/event/monitoring.go +++ b/event/monitoring.go @@ -4,16 +4,16 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package event // import "go.mongodb.org/mongo-driver/v2/event" +package event // import "go.mongodb.org/mongo-driver/event" import ( "context" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/description" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/description" ) // CommandStartedEvent represents an event generated when a command is sent to a server. diff --git a/examples/_example_customdns_test.go b/examples/_example_customdns_test.go index eeb0682250..7b378550c6 100644 --- a/examples/_example_customdns_test.go +++ b/examples/_example_customdns_test.go @@ -15,9 +15,9 @@ import ( "time" "github.com/miekg/dns" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func resolve(ctx context.Context, cache *dnsCache, in *dns.Conn, out *dns.Conn) { diff --git a/examples/_logger/logrus/main.go b/examples/_logger/logrus/main.go index 8153a99dc5..c75d72ccc2 100644 --- a/examples/_logger/logrus/main.go +++ b/examples/_logger/logrus/main.go @@ -14,9 +14,9 @@ import ( "github.com/bombsimon/logrusr/v4" "github.com/sirupsen/logrus" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func main() { diff --git a/examples/_logger/zap/main.go b/examples/_logger/zap/main.go index 5e0589c46f..ff061413f4 100644 --- a/examples/_logger/zap/main.go +++ b/examples/_logger/zap/main.go @@ -13,9 +13,9 @@ import ( "log" "github.com/go-logr/zapr" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" "go.uber.org/zap" ) diff --git a/examples/_logger/zerolog/main.go b/examples/_logger/zerolog/main.go index 408949b988..58efe415b1 100644 --- a/examples/_logger/zerolog/main.go +++ b/examples/_logger/zerolog/main.go @@ -15,9 +15,9 @@ import ( "github.com/go-logr/zerologr" "github.com/rs/zerolog" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func main() { diff --git a/examples/documentation_examples/examples.go b/examples/documentation_examples/examples.go index 4240a76937..b188448a02 100644 --- a/examples/documentation_examples/examples.go +++ b/examples/documentation_examples/examples.go @@ -16,15 +16,15 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) func requireCursorLength(t *testing.T, cursor *mongo.Cursor, length int) { diff --git a/examples/documentation_examples/examples_test.go b/examples/documentation_examples/examples_test.go index 90f7880f95..563146b9dc 100644 --- a/examples/documentation_examples/examples_test.go +++ b/examples/documentation_examples/examples_test.go @@ -14,11 +14,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/examples/documentation_examples" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/examples/documentation_examples" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestMain(m *testing.M) { diff --git a/go.mod b/go.mod index f0774ca6b1..a1d03fea02 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.org/mongo-driver/v2 +module go.mongodb.org/mongo-driver go 1.18 @@ -11,7 +11,6 @@ require ( github.com/xdg-go/scram v1.1.2 github.com/xdg-go/stringprep v1.0.4 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d - go.mongodb.org/mongo-driver v1.12.1 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 ) diff --git a/go.sum b/go.sum index 9a8e1a0670..1e37a06f66 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,6 @@ github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gi github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= -go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= 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= @@ -26,14 +24,12 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 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-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 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/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-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -41,7 +37,6 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 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.6/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= diff --git a/internal/assert/assertion_compare_go1.17_test.go b/internal/assert/assertion_compare_go1.17_test.go index 49ce4599ee..4953ca3820 100644 --- a/internal/assert/assertion_compare_go1.17_test.go +++ b/internal/assert/assertion_compare_go1.17_test.go @@ -86,7 +86,7 @@ func TestGreater17(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, Greater(out, currCase.less, currCase.greater)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.Greater") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.Greater") } } @@ -117,7 +117,7 @@ func TestGreaterOrEqual17(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, GreaterOrEqual(out, currCase.less, currCase.greater)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.GreaterOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.GreaterOrEqual") } } @@ -148,7 +148,7 @@ func TestLess17(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, Less(out, currCase.greater, currCase.less)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.Less") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.Less") } } @@ -179,6 +179,6 @@ func TestLessOrEqual17(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, LessOrEqual(out, currCase.greater, currCase.less)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.LessOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.LessOrEqual") } } diff --git a/internal/assert/assertion_compare_test.go b/internal/assert/assertion_compare_test.go index 36acdd87f4..ef8862ee67 100644 --- a/internal/assert/assertion_compare_test.go +++ b/internal/assert/assertion_compare_test.go @@ -158,7 +158,7 @@ func TestGreater(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, Greater(out, currCase.less, currCase.greater)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.Greater") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.Greater") } } @@ -199,7 +199,7 @@ func TestGreaterOrEqual(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, GreaterOrEqual(out, currCase.less, currCase.greater)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.GreaterOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.GreaterOrEqual") } } @@ -240,7 +240,7 @@ func TestLess(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, Less(out, currCase.greater, currCase.less)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.Less") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.Less") } } @@ -281,7 +281,7 @@ func TestLessOrEqual(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, LessOrEqual(out, currCase.greater, currCase.less)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.LessOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.LessOrEqual") } } @@ -320,7 +320,7 @@ func TestPositive(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, Positive(out, currCase.e)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.Positive") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.Positive") } } @@ -359,7 +359,7 @@ func TestNegative(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} False(t, Negative(out, currCase.e)) Contains(t, out.buf.String(), currCase.msg) - Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.Negative") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/internal/assert.Negative") } } diff --git a/internal/assert/assertion_mongo_test.go b/internal/assert/assertion_mongo_test.go index 9fe6f485d5..3f16af10ec 100644 --- a/internal/assert/assertion_mongo_test.go +++ b/internal/assert/assertion_mongo_test.go @@ -9,7 +9,7 @@ package assert import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) func TestDifferentAddressRanges(t *testing.T) { diff --git a/internal/aws/credentials/chain_provider.go b/internal/aws/credentials/chain_provider.go index 942c7690fa..6843927153 100644 --- a/internal/aws/credentials/chain_provider.go +++ b/internal/aws/credentials/chain_provider.go @@ -11,7 +11,7 @@ package credentials import ( - "go.mongodb.org/mongo-driver/v2/internal/aws/awserr" + "go.mongodb.org/mongo-driver/internal/aws/awserr" ) // A ChainProvider will search for a provider which returns credentials diff --git a/internal/aws/credentials/chain_provider_test.go b/internal/aws/credentials/chain_provider_test.go index 3680b78105..2e731338fb 100644 --- a/internal/aws/credentials/chain_provider_test.go +++ b/internal/aws/credentials/chain_provider_test.go @@ -14,7 +14,7 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/internal/aws/awserr" + "go.mongodb.org/mongo-driver/internal/aws/awserr" ) type secondStubProvider struct { diff --git a/internal/aws/credentials/credentials.go b/internal/aws/credentials/credentials.go index 919d0819b1..53181aa163 100644 --- a/internal/aws/credentials/credentials.go +++ b/internal/aws/credentials/credentials.go @@ -15,7 +15,7 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/awserr" + "go.mongodb.org/mongo-driver/internal/aws/awserr" "golang.org/x/sync/singleflight" ) diff --git a/internal/aws/credentials/credentials_test.go b/internal/aws/credentials/credentials_test.go index e10848c7ac..d964ea419f 100644 --- a/internal/aws/credentials/credentials_test.go +++ b/internal/aws/credentials/credentials_test.go @@ -16,7 +16,7 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/awserr" + "go.mongodb.org/mongo-driver/internal/aws/awserr" ) func isExpired(c *Credentials) bool { diff --git a/internal/aws/signer/v4/v4.go b/internal/aws/signer/v4/v4.go index eaf5cca3ee..6cf4586bb9 100644 --- a/internal/aws/signer/v4/v4.go +++ b/internal/aws/signer/v4/v4.go @@ -23,8 +23,8 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/aws" + "go.mongodb.org/mongo-driver/internal/aws/credentials" ) const ( diff --git a/internal/aws/signer/v4/v4_test.go b/internal/aws/signer/v4/v4_test.go index 2767755efe..a71fe300c7 100644 --- a/internal/aws/signer/v4/v4_test.go +++ b/internal/aws/signer/v4/v4_test.go @@ -22,9 +22,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" - "go.mongodb.org/mongo-driver/v2/internal/credproviders" + "go.mongodb.org/mongo-driver/internal/aws" + "go.mongodb.org/mongo-driver/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/credproviders" ) func epochTime() time.Time { return time.Unix(0, 0) } diff --git a/internal/bsonutil/bsonutil.go b/internal/bsonutil/bsonutil.go index 86c0fd0b78..eebb328906 100644 --- a/internal/bsonutil/bsonutil.go +++ b/internal/bsonutil/bsonutil.go @@ -9,7 +9,7 @@ package bsonutil import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) // StringSliceFromRawValue decodes the provided BSON value into a []string. This function returns an error if the value diff --git a/internal/codecutil/encoding.go b/internal/codecutil/encoding.go index 5fa031efb9..2aaf8f2719 100644 --- a/internal/codecutil/encoding.go +++ b/internal/codecutil/encoding.go @@ -13,8 +13,8 @@ import ( "io" "reflect" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var ErrNilValue = errors.New("value is nil") diff --git a/internal/codecutil/encoding_test.go b/internal/codecutil/encoding_test.go index e1045c20a7..9696048f71 100644 --- a/internal/codecutil/encoding_test.go +++ b/internal/codecutil/encoding_test.go @@ -10,11 +10,11 @@ import ( "io" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" ) func testEncFn(t *testing.T) EncoderFn { diff --git a/internal/credproviders/assume_role_provider.go b/internal/credproviders/assume_role_provider.go index eec2247c70..3a95cf401d 100644 --- a/internal/credproviders/assume_role_provider.go +++ b/internal/credproviders/assume_role_provider.go @@ -15,8 +15,8 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" - "go.mongodb.org/mongo-driver/v2/internal/uuid" + "go.mongodb.org/mongo-driver/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/uuid" ) const ( diff --git a/internal/credproviders/ec2_provider.go b/internal/credproviders/ec2_provider.go index df15a7f2c3..771bfca134 100644 --- a/internal/credproviders/ec2_provider.go +++ b/internal/credproviders/ec2_provider.go @@ -15,7 +15,7 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/aws/credentials" ) const ( diff --git a/internal/credproviders/ecs_provider.go b/internal/credproviders/ecs_provider.go index 6816a3182d..0c3a27e626 100644 --- a/internal/credproviders/ecs_provider.go +++ b/internal/credproviders/ecs_provider.go @@ -14,7 +14,7 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/aws/credentials" ) const ( diff --git a/internal/credproviders/env_provider.go b/internal/credproviders/env_provider.go index cf6bb60b31..59ca633635 100644 --- a/internal/credproviders/env_provider.go +++ b/internal/credproviders/env_provider.go @@ -9,7 +9,7 @@ package credproviders import ( "os" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/aws/credentials" ) // envProviderName provides a name of Env provider diff --git a/internal/credproviders/imds_provider.go b/internal/credproviders/imds_provider.go index f3674c727b..96dad1a829 100644 --- a/internal/credproviders/imds_provider.go +++ b/internal/credproviders/imds_provider.go @@ -15,7 +15,7 @@ import ( "net/url" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/aws/credentials" ) const ( diff --git a/internal/credproviders/static_provider.go b/internal/credproviders/static_provider.go index bbb0e8033a..6b49613941 100644 --- a/internal/credproviders/static_provider.go +++ b/internal/credproviders/static_provider.go @@ -9,7 +9,7 @@ package credproviders import ( "errors" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/aws/credentials" ) // staticProviderName provides a name of Static provider diff --git a/internal/csfle/csfle.go b/internal/csfle/csfle.go index 708b2cfde6..71e71b4687 100644 --- a/internal/csfle/csfle.go +++ b/internal/csfle/csfle.go @@ -9,7 +9,7 @@ package csfle import ( "fmt" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) const ( diff --git a/internal/eventtest/eventtest.go b/internal/eventtest/eventtest.go index 656de629a2..c06037e850 100644 --- a/internal/eventtest/eventtest.go +++ b/internal/eventtest/eventtest.go @@ -11,7 +11,7 @@ package eventtest import ( "sync" - "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/event" ) // TestPoolMonitor exposes an *event.TestPoolMonitor and collects all events logged to that diff --git a/internal/integtest/integtest.go b/internal/integtest/integtest.go index 38264f9e9d..d89bcd7539 100644 --- a/internal/integtest/integtest.go +++ b/internal/integtest/integtest.go @@ -18,15 +18,15 @@ import ( "sync" "testing" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) var connectionString connstring.ConnString diff --git a/internal/logger/component.go b/internal/logger/component.go index 5cb1f91715..0a3d553208 100644 --- a/internal/logger/component.go +++ b/internal/logger/component.go @@ -10,7 +10,7 @@ import ( "os" "strconv" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/primitive" ) const ( diff --git a/internal/logger/component_test.go b/internal/logger/component_test.go index 3bbb9ba3bd..cf752d2ad7 100644 --- a/internal/logger/component_test.go +++ b/internal/logger/component_test.go @@ -9,8 +9,8 @@ package logger import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" ) func verifySerialization(t *testing.T, got, want KeyValues) { diff --git a/internal/logger/context_test.go b/internal/logger/context_test.go index b8238ea9cb..9fee41552d 100644 --- a/internal/logger/context_test.go +++ b/internal/logger/context_test.go @@ -10,8 +10,8 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/logger" ) func TestContext_WithOperationName(t *testing.T) { diff --git a/internal/logger/logger_test.go b/internal/logger/logger_test.go index b71ac06204..8629a10748 100644 --- a/internal/logger/logger_test.go +++ b/internal/logger/logger_test.go @@ -15,7 +15,7 @@ import ( "sync" "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) type mockLogSink struct{} diff --git a/internal/ptrutil/int64_test.go b/internal/ptrutil/int64_test.go index b7b8605101..6a267484d8 100644 --- a/internal/ptrutil/int64_test.go +++ b/internal/ptrutil/int64_test.go @@ -9,7 +9,7 @@ package ptrutil import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestCompareInt64(t *testing.T) { diff --git a/internal/rand/example_test.go b/internal/rand/example_test.go index 81fab024dd..1bf04da8bb 100644 --- a/internal/rand/example_test.go +++ b/internal/rand/example_test.go @@ -12,7 +12,7 @@ import ( "strings" "text/tabwriter" - "go.mongodb.org/mongo-driver/v2/internal/rand" + "go.mongodb.org/mongo-driver/internal/rand" ) // These tests serve as an example but also make sure we don't change diff --git a/internal/rand/regress_test.go b/internal/rand/regress_test.go index c9413a2a1e..023c02962c 100644 --- a/internal/rand/regress_test.go +++ b/internal/rand/regress_test.go @@ -20,7 +20,7 @@ import ( "reflect" "testing" - . "go.mongodb.org/mongo-driver/v2/internal/rand" + . "go.mongodb.org/mongo-driver/internal/rand" ) var printgolden = flag.Bool("printgolden", false, "print golden results for regression test") diff --git a/internal/randutil/randutil.go b/internal/randutil/randutil.go index a11bf5ea6d..dd8c6d6f41 100644 --- a/internal/randutil/randutil.go +++ b/internal/randutil/randutil.go @@ -12,7 +12,7 @@ import ( "fmt" "io" - xrand "go.mongodb.org/mongo-driver/v2/internal/rand" + xrand "go.mongodb.org/mongo-driver/internal/rand" ) // NewLockedRand returns a new "x/exp/rand" pseudo-random number generator seeded with a diff --git a/internal/randutil/randutil_test.go b/internal/randutil/randutil_test.go index 08eff7e990..ca49ac6dde 100644 --- a/internal/randutil/randutil_test.go +++ b/internal/randutil/randutil_test.go @@ -9,7 +9,7 @@ package randutil import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/require" ) func TestCryptoSeed(t *testing.T) { diff --git a/internal/require/require.go b/internal/require/require.go index 1e27460a83..901c3818ee 100644 --- a/internal/require/require.go +++ b/internal/require/require.go @@ -9,7 +9,7 @@ package require import ( time "time" - assert "go.mongodb.org/mongo-driver/v2/internal/assert" + assert "go.mongodb.org/mongo-driver/internal/assert" ) // TestingT is an interface wrapper around *testing.T diff --git a/internal/spectest/spectest.go b/internal/spectest/spectest.go index 363b072c2c..276fc35572 100644 --- a/internal/spectest/spectest.go +++ b/internal/spectest/spectest.go @@ -11,7 +11,7 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/require" ) // FindJSONFilesInDir finds the JSON files in a directory. diff --git a/internal/test/compilecheck/go.mod b/internal/test/compilecheck/go.mod index d1604df8ff..d3be1dedec 100644 --- a/internal/test/compilecheck/go.mod +++ b/internal/test/compilecheck/go.mod @@ -2,12 +2,12 @@ module go.mongodb.go/mongo-driver/internal/test/compilecheck go 1.18 -replace go.mongodb.org/mongo-driver/v2 => ../../../ +replace go.mongodb.org/mongo-driver => ../../../ // 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 -require go.mongodb.org/mongo-driver/v2 v2.0.0-00010101000000-000000000000 +//require go.mongodb.org/mongo-driver +require go.mongodb.org/mongo-driver v1.11.7 require ( github.com/golang/snappy v0.0.1 // indirect diff --git a/internal/test/compilecheck/main.go b/internal/test/compilecheck/main.go index 0c0d390f32..1678e64cde 100644 --- a/internal/test/compilecheck/main.go +++ b/internal/test/compilecheck/main.go @@ -10,9 +10,9 @@ import ( "context" "fmt" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func main() { diff --git a/internal/test/faas/awslambda/mongodb/go.mod b/internal/test/faas/awslambda/mongodb/go.mod index 0c84fe8454..2213d9b9e0 100644 --- a/internal/test/faas/awslambda/mongodb/go.mod +++ b/internal/test/faas/awslambda/mongodb/go.mod @@ -2,14 +2,14 @@ module go.mongodb.go/mongo-driver/internal/test/mongodb go 1.20 -replace go.mongodb.org/mongo-driver/v2 => ../../../../../ +replace go.mongodb.org/mongo-driver => ../../../../../ 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/v2 v2.0.0-00010101000000-000000000000 + go.mongodb.org/mongo-driver v1.11.7 ) require ( diff --git a/internal/test/faas/awslambda/mongodb/main.go b/internal/test/faas/awslambda/mongodb/main.go index 4697da71ff..a0c55f9085 100644 --- a/internal/test/faas/awslambda/mongodb/main.go +++ b/internal/test/faas/awslambda/mongodb/main.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/v2/event" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) const timeout = 60 * time.Second diff --git a/internal/uuid/uuid.go b/internal/uuid/uuid.go index be233bb96a..86c2a33a73 100644 --- a/internal/uuid/uuid.go +++ b/internal/uuid/uuid.go @@ -10,7 +10,7 @@ import ( "encoding/hex" "io" - "go.mongodb.org/mongo-driver/v2/internal/randutil" + "go.mongodb.org/mongo-driver/internal/randutil" ) // UUID represents a UUID. diff --git a/internal/uuid/uuid_test.go b/internal/uuid/uuid_test.go index 76ea4d35ce..0426d07cdd 100644 --- a/internal/uuid/uuid_test.go +++ b/internal/uuid/uuid_test.go @@ -10,8 +10,8 @@ import ( "sync" "testing" - "go.mongodb.org/mongo-driver/v2/internal/israce" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/israce" + "go.mongodb.org/mongo-driver/internal/require" ) // GODRIVER-2349 diff --git a/mongo/address/addr.go b/mongo/address/addr.go index b3c1a52342..fb6abbcd7c 100644 --- a/mongo/address/addr.go +++ b/mongo/address/addr.go @@ -5,7 +5,7 @@ // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 // Package address provides structured representations of network addresses. -package address // import "go.mongodb.org/mongo-driver/v2/mongo/address" +package address // import "go.mongodb.org/mongo-driver/mongo/address" import ( "net" diff --git a/mongo/address/addr_test.go b/mongo/address/addr_test.go index 834c976df2..2242b6d49c 100644 --- a/mongo/address/addr_test.go +++ b/mongo/address/addr_test.go @@ -9,7 +9,7 @@ package address import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/require" ) func TestAddress_String(t *testing.T) { diff --git a/mongo/background_context_test.go b/mongo/background_context_test.go index 691411c8fa..fe679ed1e8 100644 --- a/mongo/background_context_test.go +++ b/mongo/background_context_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestBackgroundContext(t *testing.T) { diff --git a/mongo/batch_cursor.go b/mongo/batch_cursor.go index 40d346d91f..51d59d0ffa 100644 --- a/mongo/batch_cursor.go +++ b/mongo/batch_cursor.go @@ -10,8 +10,8 @@ import ( "context" "time" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" ) // batchCursor is the interface implemented by types that can provide batches of document results. diff --git a/mongo/bson_helpers_test.go b/mongo/bson_helpers_test.go index 1608de562b..56dba24f3d 100644 --- a/mongo/bson_helpers_test.go +++ b/mongo/bson_helpers_test.go @@ -9,8 +9,8 @@ package mongo import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" ) // compare expected and actual BSON documents. comparison succeeds if actual contains each element in expected. diff --git a/mongo/bulk_write.go b/mongo/bulk_write.go index 1acbceb3d8..58e64f1d9a 100644 --- a/mongo/bulk_write.go +++ b/mongo/bulk_write.go @@ -9,15 +9,15 @@ package mongo import ( "context" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) type bulkWriteBatch struct { diff --git a/mongo/bulk_write_models.go b/mongo/bulk_write_models.go index 0e0cadf082..64f4589189 100644 --- a/mongo/bulk_write_models.go +++ b/mongo/bulk_write_models.go @@ -7,7 +7,7 @@ package mongo import ( - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/mongo/options" ) // WriteModel is an interface implemented by models that can be used in a BulkWrite operation. Each WriteModel diff --git a/mongo/change_stream.go b/mongo/change_stream.go index cc141e095a..773cbb0e5d 100644 --- a/mongo/change_stream.go +++ b/mongo/change_stream.go @@ -14,18 +14,18 @@ import ( "strconv" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/csot" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/csot" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) var ( diff --git a/mongo/change_stream_deployment.go b/mongo/change_stream_deployment.go index b410c480c9..4dca59f91c 100644 --- a/mongo/change_stream_deployment.go +++ b/mongo/change_stream_deployment.go @@ -9,8 +9,8 @@ package mongo import ( "context" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/mongo/driver" ) type changeStreamDeployment struct { diff --git a/mongo/change_stream_test.go b/mongo/change_stream_test.go index 0db5e03381..31066a8c06 100644 --- a/mongo/change_stream_test.go +++ b/mongo/change_stream_test.go @@ -9,7 +9,7 @@ package mongo import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestChangeStream(t *testing.T) { diff --git a/mongo/client.go b/mongo/client.go index 44a71b698f..5929274831 100644 --- a/mongo/client.go +++ b/mongo/client.go @@ -13,24 +13,24 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/httputil" - "go.mongodb.org/mongo-driver/v2/internal/logger" - "go.mongodb.org/mongo-driver/v2/internal/uuid" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt" - mcopts "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/httputil" + "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/internal/uuid" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt" + mcopts "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) const ( diff --git a/mongo/client_encryption.go b/mongo/client_encryption.go index 7e0154ec67..01c2ec3193 100644 --- a/mongo/client_encryption.go +++ b/mongo/client_encryption.go @@ -12,14 +12,14 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt" - mcopts "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt" + mcopts "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" ) // ClientEncryption is used to create data keys and explicitly encrypt and decrypt BSON values. diff --git a/mongo/client_examples_test.go b/mongo/client_examples_test.go index aecd7b4894..4123e8e0e4 100644 --- a/mongo/client_examples_test.go +++ b/mongo/client_examples_test.go @@ -11,10 +11,10 @@ import ( "fmt" "log" - "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/mongo/readpref" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" ) func ExampleClient() { diff --git a/mongo/client_side_encryption_examples_test.go b/mongo/client_side_encryption_examples_test.go index 818d3d1e54..2680849013 100644 --- a/mongo/client_side_encryption_examples_test.go +++ b/mongo/client_side_encryption_examples_test.go @@ -13,9 +13,9 @@ import ( "fmt" "log" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/options" ) func Example_clientSideEncryption() { diff --git a/mongo/client_test.go b/mongo/client_test.go index 7cc53a5239..e1e8f322a8 100644 --- a/mongo/client_test.go +++ b/mongo/client_test.go @@ -14,17 +14,17 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/tag" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) var bgCtx = context.Background() diff --git a/mongo/collection.go b/mongo/collection.go index ae9b898400..6abbea9792 100644 --- a/mongo/collection.go +++ b/mongo/collection.go @@ -14,20 +14,20 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/csfle" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/csfle" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) // Collection is a handle to a MongoDB collection. It is safe for concurrent use by multiple goroutines. diff --git a/mongo/collection_test.go b/mongo/collection_test.go index d1bb5f0dae..f17e6dfda7 100644 --- a/mongo/collection_test.go +++ b/mongo/collection_test.go @@ -10,12 +10,12 @@ import ( "errors" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) const ( diff --git a/mongo/crud_examples_test.go b/mongo/crud_examples_test.go index 7b90a92dc0..e76d279139 100644 --- a/mongo/crud_examples_test.go +++ b/mongo/crud_examples_test.go @@ -13,12 +13,12 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" ) // Client examples diff --git a/mongo/crypt_retrievers.go b/mongo/crypt_retrievers.go index 2354328d1c..5e96da731a 100644 --- a/mongo/crypt_retrievers.go +++ b/mongo/crypt_retrievers.go @@ -9,7 +9,7 @@ package mongo import ( "context" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // keyRetriever gets keys from the key vault collection. diff --git a/mongo/cursor.go b/mongo/cursor.go index b6f7d5acec..d2228ed9c4 100644 --- a/mongo/cursor.go +++ b/mongo/cursor.go @@ -14,13 +14,13 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) // Cursor is used to iterate over a stream of documents. Each document can be decoded into a Go type via the Decode diff --git a/mongo/cursor_test.go b/mongo/cursor_test.go index ac6ed06dbb..3781109019 100644 --- a/mongo/cursor_test.go +++ b/mongo/cursor_test.go @@ -12,12 +12,12 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" ) type testBatchCursor struct { diff --git a/mongo/database.go b/mongo/database.go index f45334993c..f5d5ad379b 100644 --- a/mongo/database.go +++ b/mongo/database.go @@ -12,18 +12,18 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/internal/csfle" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/internal/csfle" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) var ( diff --git a/mongo/database_test.go b/mongo/database_test.go index bb3e2392c6..61905e9c56 100644 --- a/mongo/database_test.go +++ b/mongo/database_test.go @@ -12,14 +12,14 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) func setupDb(name string, opts ...*options.DatabaseOptions) *Database { diff --git a/mongo/description/description.go b/mongo/description/description.go index a6319ffe47..e750e33b14 100644 --- a/mongo/description/description.go +++ b/mongo/description/description.go @@ -5,7 +5,7 @@ // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 // Package description contains types and functions for describing the state of MongoDB clusters. -package description // import "go.mongodb.org/mongo-driver/v2/mongo/description" +package description // import "go.mongodb.org/mongo-driver/mongo/description" // Unknown is an unknown server or topology kind. const Unknown = 0 diff --git a/mongo/description/max_staleness_spec_test.go b/mongo/description/max_staleness_spec_test.go index af4f7f577f..0bab617c6a 100644 --- a/mongo/description/max_staleness_spec_test.go +++ b/mongo/description/max_staleness_spec_test.go @@ -10,7 +10,7 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/v2/internal/spectest" + "go.mongodb.org/mongo-driver/internal/spectest" ) const maxStalenessTestsDir = "../../testdata/max-staleness" diff --git a/mongo/description/selector_spec_test.go b/mongo/description/selector_spec_test.go index 0687573914..f5d2eb3291 100644 --- a/mongo/description/selector_spec_test.go +++ b/mongo/description/selector_spec_test.go @@ -10,7 +10,7 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/v2/internal/spectest" + "go.mongodb.org/mongo-driver/internal/spectest" ) const selectorTestsDir = "../../testdata/server-selection/server_selection" diff --git a/mongo/description/selector_test.go b/mongo/description/selector_test.go index 14623568fa..e83a751b94 100644 --- a/mongo/description/selector_test.go +++ b/mongo/description/selector_test.go @@ -11,11 +11,11 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/tag" ) func TestServerSelection(t *testing.T) { diff --git a/mongo/description/server.go b/mongo/description/server.go index 776099ca88..cf39423839 100644 --- a/mongo/description/server.go +++ b/mongo/description/server.go @@ -11,13 +11,13 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/internal/ptrutil" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/ptrutil" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/tag" ) // SelectedServer augments the Server type by also including the TopologyKind of the topology that includes the server. diff --git a/mongo/description/server_selector.go b/mongo/description/server_selector.go index a2eb29ce82..aee1f050cb 100644 --- a/mongo/description/server_selector.go +++ b/mongo/description/server_selector.go @@ -12,8 +12,8 @@ import ( "math" "time" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/tag" ) // ServerSelector is an interface implemented by types that can perform server selection given a topology description diff --git a/mongo/description/server_test.go b/mongo/description/server_test.go index bb5fc653b7..027cd21700 100644 --- a/mongo/description/server_test.go +++ b/mongo/description/server_test.go @@ -11,10 +11,10 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/tag" ) func TestServer(t *testing.T) { diff --git a/mongo/description/shared_spec_test.go b/mongo/description/shared_spec_test.go index aa60875858..f7fb250844 100644 --- a/mongo/description/shared_spec_test.go +++ b/mongo/description/shared_spec_test.go @@ -14,10 +14,10 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/tag" ) type testCase struct { diff --git a/mongo/description/topology.go b/mongo/description/topology.go index 916c27e935..b082515e53 100644 --- a/mongo/description/topology.go +++ b/mongo/description/topology.go @@ -9,7 +9,7 @@ package description import ( "fmt" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/readpref" ) // Topology contains information about a MongoDB cluster. diff --git a/mongo/description/topology_version.go b/mongo/description/topology_version.go index d76f7668cd..e6674ea762 100644 --- a/mongo/description/topology_version.go +++ b/mongo/description/topology_version.go @@ -9,8 +9,8 @@ package description import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" ) // TopologyVersion represents a software version. diff --git a/mongo/errors.go b/mongo/errors.go index bede43272f..72c3bcc243 100644 --- a/mongo/errors.go +++ b/mongo/errors.go @@ -14,11 +14,11 @@ import ( "net" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/codecutil" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/codecutil" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) // ErrUnacknowledgedWrite is returned by operations that have an unacknowledged write concern. diff --git a/mongo/errors_test.go b/mongo/errors_test.go index eabcab8afb..fd89c65f5f 100644 --- a/mongo/errors_test.go +++ b/mongo/errors_test.go @@ -9,9 +9,9 @@ package mongo import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" ) func TestErrorMessages(t *testing.T) { diff --git a/mongo/gridfs/bucket.go b/mongo/gridfs/bucket.go index ad01d563ab..c9f40744f2 100644 --- a/mongo/gridfs/bucket.go +++ b/mongo/gridfs/bucket.go @@ -4,7 +4,7 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package gridfs // import "go.mongodb.org/mongo-driver/v2/mongo/gridfs" +package gridfs // import "go.mongodb.org/mongo-driver/mongo/gridfs" import ( "bytes" @@ -14,15 +14,15 @@ import ( "io" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/csot" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/csot" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // TODO: add sessions options diff --git a/mongo/gridfs/download_stream.go b/mongo/gridfs/download_stream.go index 88e3a1d0a7..20c8df8a6f 100644 --- a/mongo/gridfs/download_stream.go +++ b/mongo/gridfs/download_stream.go @@ -13,8 +13,8 @@ import ( "math" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" ) // ErrWrongIndex is used when the chunk retrieved from the server does not have the expected index. diff --git a/mongo/gridfs/gridfs_examples_test.go b/mongo/gridfs/gridfs_examples_test.go index 365e4c55b3..7203444dd4 100644 --- a/mongo/gridfs/gridfs_examples_test.go +++ b/mongo/gridfs/gridfs_examples_test.go @@ -14,10 +14,10 @@ import ( "log" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo/gridfs" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/gridfs" + "go.mongodb.org/mongo-driver/mongo/options" ) func ExampleBucket_OpenUploadStream() { diff --git a/mongo/gridfs/gridfs_test.go b/mongo/gridfs/gridfs_test.go index 6329fdac49..c95cf1f8d6 100644 --- a/mongo/gridfs/gridfs_test.go +++ b/mongo/gridfs/gridfs_test.go @@ -10,13 +10,13 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) var ( diff --git a/mongo/gridfs/upload_stream.go b/mongo/gridfs/upload_stream.go index 941d786c55..cf1997db80 100644 --- a/mongo/gridfs/upload_stream.go +++ b/mongo/gridfs/upload_stream.go @@ -14,9 +14,9 @@ import ( "math" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" ) // UploadBufferSize is the size in bytes of one stream batch. Chunks will be written to the db after the sum of chunk diff --git a/mongo/index_options_builder.go b/mongo/index_options_builder.go index 5aad922646..d12deaee28 100644 --- a/mongo/index_options_builder.go +++ b/mongo/index_options_builder.go @@ -7,7 +7,7 @@ package mongo import ( - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) // IndexOptionsBuilder specifies options for a new index. diff --git a/mongo/index_view.go b/mongo/index_view.go index 63a49901fc..41a93a2145 100644 --- a/mongo/index_view.go +++ b/mongo/index_view.go @@ -13,16 +13,16 @@ import ( "fmt" "strconv" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) // ErrInvalidIndexValue is returned if an index is created with a keys document that has a value that is not a number diff --git a/mongo/integration/causal_consistency_test.go b/mongo/integration/causal_consistency_test.go index 661a4a9ec8..8c59025399 100644 --- a/mongo/integration/causal_consistency_test.go +++ b/mongo/integration/causal_consistency_test.go @@ -10,13 +10,13 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" ) // set of operations that support read concerns taken from read/write concern spec. diff --git a/mongo/integration/change_stream_test.go b/mongo/integration/change_stream_test.go index d9f166f081..868706ad1e 100644 --- a/mongo/integration/change_stream_test.go +++ b/mongo/integration/change_stream_test.go @@ -13,15 +13,15 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/eventtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) type resumeType int diff --git a/mongo/integration/clam_prose_test.go b/mongo/integration/clam_prose_test.go index 204cd34920..3b0ad2cde1 100644 --- a/mongo/integration/clam_prose_test.go +++ b/mongo/integration/clam_prose_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/internal/logger" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) var ErrInvalidTruncation = fmt.Errorf("invalid truncation") diff --git a/mongo/integration/client_options_test.go b/mongo/integration/client_options_test.go index 003badc58a..0fb068bc5e 100644 --- a/mongo/integration/client_options_test.go +++ b/mongo/integration/client_options_test.go @@ -12,11 +12,11 @@ import ( "sync/atomic" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestClientOptions_CustomDialer(t *testing.T) { diff --git a/mongo/integration/client_side_encryption_prose_test.go b/mongo/integration/client_side_encryption_prose_test.go index 07d3e1407a..45a2ef01c8 100644 --- a/mongo/integration/client_side_encryption_prose_test.go +++ b/mongo/integration/client_side_encryption_prose_test.go @@ -23,20 +23,20 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt" - mongocryptopts "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt" + mongocryptopts "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" ) var ( diff --git a/mongo/integration/client_side_encryption_test.go b/mongo/integration/client_side_encryption_test.go index 86a40f85b4..88fe567932 100644 --- a/mongo/integration/client_side_encryption_test.go +++ b/mongo/integration/client_side_encryption_test.go @@ -13,18 +13,18 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - mcopts "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + mcopts "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" ) // createDataKeyAndEncrypt creates a data key with the alternate name @keyName. diff --git a/mongo/integration/client_test.go b/mongo/integration/client_test.go index 5326baafaf..038ed25d72 100644 --- a/mongo/integration/client_test.go +++ b/mongo/integration/client_test.go @@ -16,23 +16,23 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/eventtest" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" "golang.org/x/sync/errgroup" ) diff --git a/mongo/integration/cmd_monitoring_helpers_test.go b/mongo/integration/cmd_monitoring_helpers_test.go index 919116e75a..6c4931d26c 100644 --- a/mongo/integration/cmd_monitoring_helpers_test.go +++ b/mongo/integration/cmd_monitoring_helpers_test.go @@ -13,12 +13,12 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // Helper functions to compare BSON values and command monitoring expectations. diff --git a/mongo/integration/collection_test.go b/mongo/integration/collection_test.go index bd3b2a74fa..4e7f24813d 100644 --- a/mongo/integration/collection_test.go +++ b/mongo/integration/collection_test.go @@ -12,15 +12,15 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) const ( diff --git a/mongo/integration/crud_helpers_test.go b/mongo/integration/crud_helpers_test.go index eab1c469e8..a60adeb683 100644 --- a/mongo/integration/crud_helpers_test.go +++ b/mongo/integration/crud_helpers_test.go @@ -15,19 +15,19 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/gridfs" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/integration/unified" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/gridfs" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/integration/unified" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" ) // Helper functions to execute and verify results from CRUD methods. diff --git a/mongo/integration/crud_prose_test.go b/mongo/integration/crud_prose_test.go index 19cb4bc0f2..00a1f0ff36 100644 --- a/mongo/integration/crud_prose_test.go +++ b/mongo/integration/crud_prose_test.go @@ -12,12 +12,12 @@ import ( "errors" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestWriteErrorsWithLabels(t *testing.T) { diff --git a/mongo/integration/crud_spec_test.go b/mongo/integration/crud_spec_test.go index ec24fcc1df..a80a9dd53c 100644 --- a/mongo/integration/crud_spec_test.go +++ b/mongo/integration/crud_spec_test.go @@ -16,11 +16,11 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) const ( diff --git a/mongo/integration/csot_cse_prose_test.go b/mongo/integration/csot_cse_prose_test.go index 121a3418b6..e3b30f5c3c 100644 --- a/mongo/integration/csot_cse_prose_test.go +++ b/mongo/integration/csot_cse_prose_test.go @@ -13,13 +13,13 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) // CSOT prose tests that require the 'cse' Go build tag. diff --git a/mongo/integration/csot_prose_test.go b/mongo/integration/csot_prose_test.go index fff65a90d5..4f9f112b3f 100644 --- a/mongo/integration/csot_prose_test.go +++ b/mongo/integration/csot_prose_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestCSOTProse(t *testing.T) { diff --git a/mongo/integration/cursor_test.go b/mongo/integration/cursor_test.go index 8d6ed41d6f..9f57d3a6dd 100644 --- a/mongo/integration/cursor_test.go +++ b/mongo/integration/cursor_test.go @@ -13,11 +13,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) const ( diff --git a/mongo/integration/data_lake_test.go b/mongo/integration/data_lake_test.go index 77596e8778..e0add0299e 100644 --- a/mongo/integration/data_lake_test.go +++ b/mongo/integration/data_lake_test.go @@ -11,10 +11,10 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestAtlasDataLake(t *testing.T) { diff --git a/mongo/integration/database_test.go b/mongo/integration/database_test.go index 5be7a3c61a..29b75ddc8a 100644 --- a/mongo/integration/database_test.go +++ b/mongo/integration/database_test.go @@ -13,16 +13,16 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) const ( diff --git a/mongo/integration/errors_test.go b/mongo/integration/errors_test.go index fd842d89ad..c74bc889c0 100644 --- a/mongo/integration/errors_test.go +++ b/mongo/integration/errors_test.go @@ -17,14 +17,14 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) type netErr struct { diff --git a/mongo/integration/gridfs_test.go b/mongo/integration/gridfs_test.go index cd370fa20c..509c008d51 100644 --- a/mongo/integration/gridfs_test.go +++ b/mongo/integration/gridfs_test.go @@ -15,15 +15,15 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/israce" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/gridfs" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/israce" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/gridfs" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestGridFS(x *testing.T) { diff --git a/mongo/integration/handshake_test.go b/mongo/integration/handshake_test.go index 7fe2ef329a..3e9989158e 100644 --- a/mongo/integration/handshake_test.go +++ b/mongo/integration/handshake_test.go @@ -13,13 +13,13 @@ import ( "runtime" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/version" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/version" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestHandshakeProse(t *testing.T) { diff --git a/mongo/integration/index_view_test.go b/mongo/integration/index_view_test.go index 822975f5d8..e0cc6e2f87 100644 --- a/mongo/integration/index_view_test.go +++ b/mongo/integration/index_view_test.go @@ -12,13 +12,13 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) type index struct { diff --git a/mongo/integration/initial_dns_seedlist_discovery_test.go b/mongo/integration/initial_dns_seedlist_discovery_test.go index 16a21973cc..92a20a721a 100644 --- a/mongo/integration/initial_dns_seedlist_discovery_test.go +++ b/mongo/integration/initial_dns_seedlist_discovery_test.go @@ -17,15 +17,15 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) const ( diff --git a/mongo/integration/json_helpers_test.go b/mongo/integration/json_helpers_test.go index e9407ff492..749de6a5b1 100644 --- a/mongo/integration/json_helpers_test.go +++ b/mongo/integration/json_helpers_test.go @@ -17,13 +17,13 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) var ( diff --git a/mongo/integration/load_balancer_prose_test.go b/mongo/integration/load_balancer_prose_test.go index 01c41b2cbb..430e063540 100644 --- a/mongo/integration/load_balancer_prose_test.go +++ b/mongo/integration/load_balancer_prose_test.go @@ -13,12 +13,12 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestLoadBalancerSupport(t *testing.T) { diff --git a/mongo/integration/log_helpers_test.go b/mongo/integration/log_helpers_test.go index f82e6ef70d..9b31c166de 100644 --- a/mongo/integration/log_helpers_test.go +++ b/mongo/integration/log_helpers_test.go @@ -10,8 +10,8 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/internal/logger" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) type testLogSink struct { diff --git a/mongo/integration/main.go b/mongo/integration/main.go index c8addd2158..16e89d3263 100644 --- a/mongo/integration/main.go +++ b/mongo/integration/main.go @@ -9,5 +9,5 @@ package integration // This file exists to allow the build scripts (and standard Go builds for some early Go versions) // to succeed. Without it, the build may encounter an error like: // -// go build go.mongodb.org/mongo-driver/v2/mongo/integration: build constraints exclude all Go files in ./go.mongodb.org/mongo-driver/v2/mongo/integration +// go build go.mongodb.org/mongo-driver/mongo/integration: build constraints exclude all Go files in ./go.mongodb.org/mongo-driver/mongo/integration // diff --git a/mongo/integration/main_test.go b/mongo/integration/main_test.go index 169b9eed77..394fd5be6c 100644 --- a/mongo/integration/main_test.go +++ b/mongo/integration/main_test.go @@ -12,7 +12,7 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) func TestMain(m *testing.M) { diff --git a/mongo/integration/mock_find_test.go b/mongo/integration/mock_find_test.go index b4c061583d..ad90c82fba 100644 --- a/mongo/integration/mock_find_test.go +++ b/mongo/integration/mock_find_test.go @@ -10,12 +10,12 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) // finder is an object that implements FindOne and Find. diff --git a/mongo/integration/mongos_pinning_test.go b/mongo/integration/mongos_pinning_test.go index 0c44f9e0d7..a436ca981c 100644 --- a/mongo/integration/mongos_pinning_test.go +++ b/mongo/integration/mongos_pinning_test.go @@ -12,11 +12,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestMongosPinning(t *testing.T) { diff --git a/mongo/integration/mtest/deployment_helpers.go b/mongo/integration/mtest/deployment_helpers.go index 86833032a5..299fae5672 100644 --- a/mongo/integration/mtest/deployment_helpers.go +++ b/mongo/integration/mtest/deployment_helpers.go @@ -7,7 +7,7 @@ package mtest import ( - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) // BatchIdentifier specifies the keyword to identify the batch in a cursor response. diff --git a/mongo/integration/mtest/global_state.go b/mongo/integration/mtest/global_state.go index 1f27449cd8..4ca4219977 100644 --- a/mongo/integration/mtest/global_state.go +++ b/mongo/integration/mtest/global_state.go @@ -10,10 +10,10 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) // AuthEnabled returns whether or not the cluster requires auth. diff --git a/mongo/integration/mtest/mongotest.go b/mongo/integration/mtest/mongotest.go index fdc7465d17..d5235d228e 100644 --- a/mongo/integration/mtest/mongotest.go +++ b/mongo/integration/mtest/mongotest.go @@ -15,17 +15,17 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/csfle" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/csfle" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" ) var ( diff --git a/mongo/integration/mtest/opmsg_deployment.go b/mongo/integration/mtest/opmsg_deployment.go index 93dfaabe7e..ae4e359380 100644 --- a/mongo/integration/mtest/opmsg_deployment.go +++ b/mongo/integration/mtest/opmsg_deployment.go @@ -10,14 +10,14 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/csot" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/csot" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) const ( diff --git a/mongo/integration/mtest/options.go b/mongo/integration/mtest/options.go index 567a61c6fb..c756c414c5 100644 --- a/mongo/integration/mtest/options.go +++ b/mongo/integration/mtest/options.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/options" ) // TopologyKind describes the topology that a test is run on. diff --git a/mongo/integration/mtest/proxy_dialer.go b/mongo/integration/mtest/proxy_dialer.go index 888d3005e4..b50f37488a 100644 --- a/mongo/integration/mtest/proxy_dialer.go +++ b/mongo/integration/mtest/proxy_dialer.go @@ -14,8 +14,8 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // ProxyMessage represents a sent/received pair of parsed wire messages. diff --git a/mongo/integration/mtest/received_message.go b/mongo/integration/mtest/received_message.go index c801ed3094..3df507e5a5 100644 --- a/mongo/integration/mtest/received_message.go +++ b/mongo/integration/mtest/received_message.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) // ReceivedMessage represents a message received from the server. diff --git a/mongo/integration/mtest/sent_message.go b/mongo/integration/mtest/sent_message.go index 81f395425a..6b96e061bc 100644 --- a/mongo/integration/mtest/sent_message.go +++ b/mongo/integration/mtest/sent_message.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) // SentMessage represents a message sent by the driver to the server. diff --git a/mongo/integration/mtest/setup.go b/mongo/integration/mtest/setup.go index 61b314b608..be2dae93b8 100644 --- a/mongo/integration/mtest/setup.go +++ b/mongo/integration/mtest/setup.go @@ -16,16 +16,16 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) const ( diff --git a/mongo/integration/mtest/wiremessage_helpers.go b/mongo/integration/mtest/wiremessage_helpers.go index fa08b358bc..192271a7f4 100644 --- a/mongo/integration/mtest/wiremessage_helpers.go +++ b/mongo/integration/mtest/wiremessage_helpers.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) func copyBytes(original []byte) []byte { diff --git a/mongo/integration/primary_stepdown_test.go b/mongo/integration/primary_stepdown_test.go index 1eb07fb3f3..4a51d83b02 100644 --- a/mongo/integration/primary_stepdown_test.go +++ b/mongo/integration/primary_stepdown_test.go @@ -10,12 +10,12 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/eventtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) const ( diff --git a/mongo/integration/retryable_reads_prose_test.go b/mongo/integration/retryable_reads_prose_test.go index e854f47e27..80f4d3329a 100644 --- a/mongo/integration/retryable_reads_prose_test.go +++ b/mongo/integration/retryable_reads_prose_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/eventtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestRetryableReadsProse(t *testing.T) { diff --git a/mongo/integration/retryable_writes_prose_test.go b/mongo/integration/retryable_writes_prose_test.go index 3d54d8e59a..1c8d353f14 100644 --- a/mongo/integration/retryable_writes_prose_test.go +++ b/mongo/integration/retryable_writes_prose_test.go @@ -14,16 +14,16 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/eventtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/mongo/driver" ) func TestRetryableWritesProse(t *testing.T) { diff --git a/mongo/integration/retryable_writes_spec_test.go b/mongo/integration/retryable_writes_spec_test.go index 1f6c310836..c1e104ab80 100644 --- a/mongo/integration/retryable_writes_spec_test.go +++ b/mongo/integration/retryable_writes_spec_test.go @@ -11,9 +11,9 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) const retryableWritesTestDir = "../../testdata/retryable-writes/legacy" diff --git a/mongo/integration/sdam_error_handling_test.go b/mongo/integration/sdam_error_handling_test.go index dc166512d5..58cac9ccdd 100644 --- a/mongo/integration/sdam_error_handling_test.go +++ b/mongo/integration/sdam_error_handling_test.go @@ -16,12 +16,12 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/eventtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestSDAMErrorHandling(t *testing.T) { diff --git a/mongo/integration/sdam_prose_test.go b/mongo/integration/sdam_prose_test.go index 8f83a642e5..21b1fea4ba 100644 --- a/mongo/integration/sdam_prose_test.go +++ b/mongo/integration/sdam_prose_test.go @@ -12,11 +12,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestSDAMProse(t *testing.T) { diff --git a/mongo/integration/server_selection_prose_test.go b/mongo/integration/server_selection_prose_test.go index 71d24eff43..e6486ae123 100644 --- a/mongo/integration/server_selection_prose_test.go +++ b/mongo/integration/server_selection_prose_test.go @@ -12,14 +12,14 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/eventtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) type saturatedConnections map[uint64]bool diff --git a/mongo/integration/sessions_mongocryptd_prose_test.go b/mongo/integration/sessions_mongocryptd_prose_test.go index 0c7b36f610..fd516445df 100644 --- a/mongo/integration/sessions_mongocryptd_prose_test.go +++ b/mongo/integration/sessions_mongocryptd_prose_test.go @@ -15,14 +15,14 @@ import ( "strconv" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) type mongocryptdProcess struct { diff --git a/mongo/integration/sessions_test.go b/mongo/integration/sessions_test.go index f22f1ce940..dfd3e2d260 100644 --- a/mongo/integration/sessions_test.go +++ b/mongo/integration/sessions_test.go @@ -16,15 +16,15 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" "golang.org/x/sync/errgroup" ) diff --git a/mongo/integration/unified/admin_helpers.go b/mongo/integration/unified/admin_helpers.go index 4bc126d8b5..8d4b0dbf75 100644 --- a/mongo/integration/unified/admin_helpers.go +++ b/mongo/integration/unified/admin_helpers.go @@ -11,11 +11,11 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" ) var ( diff --git a/mongo/integration/unified/bsonutil.go b/mongo/integration/unified/bsonutil.go index 20cfa52de6..e95af0b7cb 100644 --- a/mongo/integration/unified/bsonutil.go +++ b/mongo/integration/unified/bsonutil.go @@ -9,9 +9,9 @@ package unified import ( "sort" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var ( diff --git a/mongo/integration/unified/bucket_options.go b/mongo/integration/unified/bucket_options.go index 44ac0f3d54..a738a42aa6 100644 --- a/mongo/integration/unified/bucket_options.go +++ b/mongo/integration/unified/bucket_options.go @@ -9,8 +9,8 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/options" ) // gridFSBucketOptions is a wrapper for *options.BucketOptions. This type implements the bson.Unmarshaler interface to diff --git a/mongo/integration/unified/bulkwrite_helpers.go b/mongo/integration/unified/bulkwrite_helpers.go index 784208b2ce..895c57e990 100644 --- a/mongo/integration/unified/bulkwrite_helpers.go +++ b/mongo/integration/unified/bulkwrite_helpers.go @@ -9,10 +9,10 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) // This file provides helper functions to convert BSON documents to WriteModel instances. diff --git a/mongo/integration/unified/client_encryption_operation_execution.go b/mongo/integration/unified/client_encryption_operation_execution.go index a39ff16acc..2a6b55f11c 100644 --- a/mongo/integration/unified/client_encryption_operation_execution.go +++ b/mongo/integration/unified/client_encryption_operation_execution.go @@ -10,11 +10,11 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // parseDataKeyOptions will parse an options document and return an options.DataKeyOptions instance. diff --git a/mongo/integration/unified/client_entity.go b/mongo/integration/unified/client_entity.go index a42014528c..e63c891039 100644 --- a/mongo/integration/unified/client_entity.go +++ b/mongo/integration/unified/client_entity.go @@ -14,16 +14,16 @@ import ( "sync/atomic" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/internal/logger" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // There are no automated tests for truncation. Given that, setting the diff --git a/mongo/integration/unified/client_operation_execution.go b/mongo/integration/unified/client_operation_execution.go index 2a6e0f792b..506ca4f351 100644 --- a/mongo/integration/unified/client_operation_execution.go +++ b/mongo/integration/unified/client_operation_execution.go @@ -11,11 +11,11 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // This file contains helpers to execute client operations. diff --git a/mongo/integration/unified/collection_data.go b/mongo/integration/unified/collection_data.go index f37733e3a4..979ecccf05 100644 --- a/mongo/integration/unified/collection_data.go +++ b/mongo/integration/unified/collection_data.go @@ -11,12 +11,12 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" ) type collectionData struct { diff --git a/mongo/integration/unified/collection_operation_execution.go b/mongo/integration/unified/collection_operation_execution.go index 37b0e2dee2..18c6e040fe 100644 --- a/mongo/integration/unified/collection_operation_execution.go +++ b/mongo/integration/unified/collection_operation_execution.go @@ -11,12 +11,12 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // This file contains helpers to execute collection operations. diff --git a/mongo/integration/unified/common_options.go b/mongo/integration/unified/common_options.go index 5b42ad4d9b..04a462d7b6 100644 --- a/mongo/integration/unified/common_options.go +++ b/mongo/integration/unified/common_options.go @@ -10,11 +10,11 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/tag" ) // This file defines helper types to convert BSON documents to ReadConcern, WriteConcern, and ReadPref objects. diff --git a/mongo/integration/unified/context.go b/mongo/integration/unified/context.go index cf82de1f53..d97abaf023 100644 --- a/mongo/integration/unified/context.go +++ b/mongo/integration/unified/context.go @@ -10,7 +10,7 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/mongo" ) // ctxKey is used to define keys for values stored in context.Context objects. diff --git a/mongo/integration/unified/crud_helpers.go b/mongo/integration/unified/crud_helpers.go index da471b9551..245d0e02a9 100644 --- a/mongo/integration/unified/crud_helpers.go +++ b/mongo/integration/unified/crud_helpers.go @@ -9,10 +9,10 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/mongo/options" ) // newMissingArgumentError creates an error to convey that an argument that is required to run an operation is missing diff --git a/mongo/integration/unified/cursor_operation_execution.go b/mongo/integration/unified/cursor_operation_execution.go index 672a079ed4..390e844ad0 100644 --- a/mongo/integration/unified/cursor_operation_execution.go +++ b/mongo/integration/unified/cursor_operation_execution.go @@ -10,7 +10,7 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) func executeIterateOnce(ctx context.Context, operation *operation) (*operationResult, error) { diff --git a/mongo/integration/unified/database_operation_execution.go b/mongo/integration/unified/database_operation_execution.go index 2efe643cad..661f982982 100644 --- a/mongo/integration/unified/database_operation_execution.go +++ b/mongo/integration/unified/database_operation_execution.go @@ -11,10 +11,10 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/mongo/options" ) // This file contains helpers to execute database operations. diff --git a/mongo/integration/unified/db_collection_options.go b/mongo/integration/unified/db_collection_options.go index 51d4e7e674..934f2530ef 100644 --- a/mongo/integration/unified/db_collection_options.go +++ b/mongo/integration/unified/db_collection_options.go @@ -9,8 +9,8 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/options" ) type dbOrCollectionOptions struct { diff --git a/mongo/integration/unified/entity.go b/mongo/integration/unified/entity.go index cf5eadf308..06de9b6e78 100644 --- a/mongo/integration/unified/entity.go +++ b/mongo/integration/unified/entity.go @@ -17,11 +17,11 @@ import ( "sync/atomic" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/gridfs" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/gridfs" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) var ( diff --git a/mongo/integration/unified/entity_test.go b/mongo/integration/unified/entity_test.go index 05fbde3292..134e882e2f 100644 --- a/mongo/integration/unified/entity_test.go +++ b/mongo/integration/unified/entity_test.go @@ -10,8 +10,8 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestEntityMap(t *testing.T) { diff --git a/mongo/integration/unified/error.go b/mongo/integration/unified/error.go index af79ce0f79..2137fa3432 100644 --- a/mongo/integration/unified/error.go +++ b/mongo/integration/unified/error.go @@ -11,8 +11,8 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" ) // expectedError represents an error that is expected to occur during a test. This type ignores the "isError" field in diff --git a/mongo/integration/unified/event.go b/mongo/integration/unified/event.go index b967dc1916..a6da6bf327 100644 --- a/mongo/integration/unified/event.go +++ b/mongo/integration/unified/event.go @@ -9,9 +9,9 @@ package unified import ( "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/mongo/description" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/mongo/description" ) type monitoringEventType string diff --git a/mongo/integration/unified/event_verification.go b/mongo/integration/unified/event_verification.go index fbda153baf..91f7452907 100644 --- a/mongo/integration/unified/event_verification.go +++ b/mongo/integration/unified/event_verification.go @@ -11,10 +11,10 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/event" ) type commandMonitoringEvent struct { diff --git a/mongo/integration/unified/gridfs_bucket_operation_execution.go b/mongo/integration/unified/gridfs_bucket_operation_execution.go index 1f94d9e118..3be6fded0c 100644 --- a/mongo/integration/unified/gridfs_bucket_operation_execution.go +++ b/mongo/integration/unified/gridfs_bucket_operation_execution.go @@ -14,10 +14,10 @@ import ( "io" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func createBucketFindCursor(ctx context.Context, operation *operation) (*cursorResult, error) { diff --git a/mongo/integration/unified/logger.go b/mongo/integration/unified/logger.go index 06eae3b1a7..6dcadacf4a 100644 --- a/mongo/integration/unified/logger.go +++ b/mongo/integration/unified/logger.go @@ -7,7 +7,7 @@ package unified import ( - "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/internal/logger" ) // orderedLogMessage is a logMessage with an "order" field representing the diff --git a/mongo/integration/unified/logger_verification.go b/mongo/integration/unified/logger_verification.go index 586745e9b5..2b8e4e9d11 100644 --- a/mongo/integration/unified/logger_verification.go +++ b/mongo/integration/unified/logger_verification.go @@ -11,8 +11,8 @@ import ( "fmt" "sync" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/logger" ) // errLoggerVerification is use to wrap errors associated with validating the diff --git a/mongo/integration/unified/logger_verification_test.go b/mongo/integration/unified/logger_verification_test.go index bf0c7f25ee..5defb8d1c0 100644 --- a/mongo/integration/unified/logger_verification_test.go +++ b/mongo/integration/unified/logger_verification_test.go @@ -10,9 +10,9 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/logger" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/internal/require" ) func newTestLogMessage(t *testing.T, level int, msg string, args ...interface{}) *logMessage { diff --git a/mongo/integration/unified/main_test.go b/mongo/integration/unified/main_test.go index 37d437d7fe..3758b2856e 100644 --- a/mongo/integration/unified/main_test.go +++ b/mongo/integration/unified/main_test.go @@ -12,7 +12,7 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) func TestMain(m *testing.M) { diff --git a/mongo/integration/unified/matches.go b/mongo/integration/unified/matches.go index e3ed7e5696..51df30a7dd 100644 --- a/mongo/integration/unified/matches.go +++ b/mongo/integration/unified/matches.go @@ -13,8 +13,8 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // keyPathCtxKey is used as a key for a Context object. The value conveys the BSON key path that is currently being diff --git a/mongo/integration/unified/matches_test.go b/mongo/integration/unified/matches_test.go index 0ec0adfece..fed9ce925e 100644 --- a/mongo/integration/unified/matches_test.go +++ b/mongo/integration/unified/matches_test.go @@ -11,10 +11,10 @@ import ( "encoding/hex" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestMatches(t *testing.T) { diff --git a/mongo/integration/unified/operation.go b/mongo/integration/unified/operation.go index 1cddcbfd84..bd46820009 100644 --- a/mongo/integration/unified/operation.go +++ b/mongo/integration/unified/operation.go @@ -11,9 +11,9 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/csot" - "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/csot" + "go.mongodb.org/mongo-driver/mongo" ) type operation struct { diff --git a/mongo/integration/unified/result.go b/mongo/integration/unified/result.go index 5c2cd0add6..6c7a71a565 100644 --- a/mongo/integration/unified/result.go +++ b/mongo/integration/unified/result.go @@ -10,8 +10,8 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // operationResult holds the result and/or error returned by an op. diff --git a/mongo/integration/unified/schema_version.go b/mongo/integration/unified/schema_version.go index c655aa7a3c..c85a2efa79 100644 --- a/mongo/integration/unified/schema_version.go +++ b/mongo/integration/unified/schema_version.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) var ( diff --git a/mongo/integration/unified/server_api_options.go b/mongo/integration/unified/server_api_options.go index e9379386d2..1e619aca13 100644 --- a/mongo/integration/unified/server_api_options.go +++ b/mongo/integration/unified/server_api_options.go @@ -9,8 +9,8 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/options" ) // serverAPIOptions is a wrapper for *options.ServerAPIOptions. This type implements the bson.Unmarshaler interface diff --git a/mongo/integration/unified/session_operation_execution.go b/mongo/integration/unified/session_operation_execution.go index 7f03f17b3b..98e576093d 100644 --- a/mongo/integration/unified/session_operation_execution.go +++ b/mongo/integration/unified/session_operation_execution.go @@ -10,9 +10,9 @@ import ( "context" "fmt" - "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/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) func executeAbortTransaction(ctx context.Context, operation *operation) (*operationResult, error) { diff --git a/mongo/integration/unified/session_options.go b/mongo/integration/unified/session_options.go index da4d389e13..9882073b22 100644 --- a/mongo/integration/unified/session_options.go +++ b/mongo/integration/unified/session_options.go @@ -10,8 +10,8 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/options" ) // transactionOptions is a wrapper for *options.transactionOptions. This type implements the bson.Unmarshaler interface diff --git a/mongo/integration/unified/testrunner_operation.go b/mongo/integration/unified/testrunner_operation.go index 8556e7a069..474c01c88a 100644 --- a/mongo/integration/unified/testrunner_operation.go +++ b/mongo/integration/unified/testrunner_operation.go @@ -12,11 +12,11 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) var waitForEventTimeout = 10 * time.Second diff --git a/mongo/integration/unified/unified_spec_runner.go b/mongo/integration/unified/unified_spec_runner.go index a2422c3ea1..1b1cbeb533 100644 --- a/mongo/integration/unified/unified_spec_runner.go +++ b/mongo/integration/unified/unified_spec_runner.go @@ -15,11 +15,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/spectest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/spectest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) var ( diff --git a/mongo/integration/unified_runner_events_helper_test.go b/mongo/integration/unified_runner_events_helper_test.go index 5fd5b698f0..44d5cf5c8b 100644 --- a/mongo/integration/unified_runner_events_helper_test.go +++ b/mongo/integration/unified_runner_events_helper_test.go @@ -11,13 +11,13 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) // Helper functions for the operations in the unified spec test runner that require assertions about SDAM and connection diff --git a/mongo/integration/unified_runner_thread_helpers_test.go b/mongo/integration/unified_runner_thread_helpers_test.go index ac5ef1f5ff..8ab2530b3d 100644 --- a/mongo/integration/unified_runner_thread_helpers_test.go +++ b/mongo/integration/unified_runner_thread_helpers_test.go @@ -10,9 +10,9 @@ import ( "fmt" "sync" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) // Helper functions for the operations in the unified spec test runner that require creating and synchronizing diff --git a/mongo/integration/unified_spec_test.go b/mongo/integration/unified_spec_test.go index 89762545f5..c12df5f6ea 100644 --- a/mongo/integration/unified_spec_test.go +++ b/mongo/integration/unified_spec_test.go @@ -19,23 +19,23 @@ import ( "time" "unsafe" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/gridfs" - "go.mongodb.org/mongo-driver/v2/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/gridfs" + "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) const ( diff --git a/mongo/mongo.go b/mongo/mongo.go index 76b1977d55..393c5b7713 100644 --- a/mongo/mongo.go +++ b/mongo/mongo.go @@ -4,7 +4,7 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package mongo // import "go.mongodb.org/mongo-driver/v2/mongo" +package mongo // import "go.mongodb.org/mongo-driver/mongo" import ( "bytes" @@ -17,15 +17,15 @@ import ( "strconv" "strings" - "go.mongodb.org/mongo-driver/v2/internal/codecutil" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/internal/codecutil" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsonrw" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsonrw" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // Dialer is used to make network connections. diff --git a/mongo/mongo_test.go b/mongo/mongo_test.go index e441d5eda9..fd3f1ce869 100644 --- a/mongo/mongo_test.go +++ b/mongo/mongo_test.go @@ -11,15 +11,15 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/codecutil" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/codecutil" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestEnsureID(t *testing.T) { diff --git a/mongo/mongocryptd.go b/mongo/mongocryptd.go index bf94b31957..41aebc76c1 100644 --- a/mongo/mongocryptd.go +++ b/mongo/mongocryptd.go @@ -12,10 +12,10 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) const ( diff --git a/mongo/ocsp_test.go b/mongo/ocsp_test.go index ba9ce9b937..55cd4e1d9b 100644 --- a/mongo/ocsp_test.go +++ b/mongo/ocsp_test.go @@ -14,10 +14,10 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" ) func TestOCSP(t *testing.T) { diff --git a/mongo/options/aggregateoptions.go b/mongo/options/aggregateoptions.go index c4e96abc5b..20e1c70439 100644 --- a/mongo/options/aggregateoptions.go +++ b/mongo/options/aggregateoptions.go @@ -9,7 +9,7 @@ package options import ( "time" - "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/bson" ) // AggregateOptions represents options that can be used to configure an Aggregate operation. diff --git a/mongo/options/autoencryptionoptions.go b/mongo/options/autoencryptionoptions.go index 2565c9fdb8..15d513862d 100644 --- a/mongo/options/autoencryptionoptions.go +++ b/mongo/options/autoencryptionoptions.go @@ -10,7 +10,7 @@ import ( "crypto/tls" "net/http" - "go.mongodb.org/mongo-driver/v2/internal/httputil" + "go.mongodb.org/mongo-driver/internal/httputil" ) // AutoEncryptionOptions represents options used to configure auto encryption/decryption behavior for a mongo.Client diff --git a/mongo/options/changestreamoptions.go b/mongo/options/changestreamoptions.go index 04652b617a..3d06a668e5 100644 --- a/mongo/options/changestreamoptions.go +++ b/mongo/options/changestreamoptions.go @@ -9,8 +9,8 @@ package options import ( "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" ) // ChangeStreamOptions represents options that can be used to configure a Watch operation. diff --git a/mongo/options/changestreamoptions_test.go b/mongo/options/changestreamoptions_test.go index d1fe83d78a..7b9179c2ff 100644 --- a/mongo/options/changestreamoptions_test.go +++ b/mongo/options/changestreamoptions_test.go @@ -9,7 +9,7 @@ package options import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestMergeChangeStreamOptions(t *testing.T) { diff --git a/mongo/options/clientencryptionoptions.go b/mongo/options/clientencryptionoptions.go index c79815c1f5..2457f682ba 100644 --- a/mongo/options/clientencryptionoptions.go +++ b/mongo/options/clientencryptionoptions.go @@ -11,7 +11,7 @@ import ( "fmt" "net/http" - "go.mongodb.org/mongo-driver/v2/internal/httputil" + "go.mongodb.org/mongo-driver/internal/httputil" ) // ClientEncryptionOptions represents all possible options used to configure a ClientEncryption instance. diff --git a/mongo/options/clientoptions.go b/mongo/options/clientoptions.go index ecb581ae4f..f014da418b 100644 --- a/mongo/options/clientoptions.go +++ b/mongo/options/clientoptions.go @@ -4,7 +4,7 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package options // import "go.mongodb.org/mongo-driver/v2/mongo/options" +package options // import "go.mongodb.org/mongo-driver/mongo/options" import ( "bytes" @@ -21,16 +21,16 @@ import ( "time" "github.com/youmark/pkcs8" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/httputil" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/tag" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/httputil" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) // ContextDialer is an interface that can be implemented by types that can create connections. It should be used to diff --git a/mongo/options/clientoptions_test.go b/mongo/options/clientoptions_test.go index 908eb392ad..7c148ca0bd 100644 --- a/mongo/options/clientoptions_test.go +++ b/mongo/options/clientoptions_test.go @@ -24,15 +24,15 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/httputil" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/httputil" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" ) var tClientOptions = reflect.TypeOf(&ClientOptions{}) diff --git a/mongo/options/collation_test.go b/mongo/options/collation_test.go index 9ec61ca66a..084c4a9910 100644 --- a/mongo/options/collation_test.go +++ b/mongo/options/collation_test.go @@ -10,7 +10,7 @@ import ( "bytes" "testing" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestCollation(t *testing.T) { diff --git a/mongo/options/collectionoptions.go b/mongo/options/collectionoptions.go index 72277e6b8c..04fda6d779 100644 --- a/mongo/options/collectionoptions.go +++ b/mongo/options/collectionoptions.go @@ -7,10 +7,10 @@ package options import ( - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) // CollectionOptions represents options that can be used to configure a Collection. diff --git a/mongo/options/dboptions.go b/mongo/options/dboptions.go index 55a291059c..8a380d2168 100644 --- a/mongo/options/dboptions.go +++ b/mongo/options/dboptions.go @@ -7,10 +7,10 @@ package options import ( - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) // DatabaseOptions represents options that can be used to configure a Database. diff --git a/mongo/options/encryptoptions.go b/mongo/options/encryptoptions.go index 3d4bfc0187..88517d0c8d 100644 --- a/mongo/options/encryptoptions.go +++ b/mongo/options/encryptoptions.go @@ -7,8 +7,8 @@ package options import ( - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" ) // These constants specify valid values for QueryType diff --git a/mongo/options/example_test.go b/mongo/options/example_test.go index 12a665fca1..1c5fbe4356 100644 --- a/mongo/options/example_test.go +++ b/mongo/options/example_test.go @@ -14,8 +14,8 @@ import ( "log" "sync" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" ) type CustomLogger struct { diff --git a/mongo/options/gridfsoptions.go b/mongo/options/gridfsoptions.go index 4c6462792c..c8d347f4e7 100644 --- a/mongo/options/gridfsoptions.go +++ b/mongo/options/gridfsoptions.go @@ -9,11 +9,11 @@ package options import ( "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) // DefaultName is the default name for a GridFS bucket. diff --git a/mongo/options/loggeroptions.go b/mongo/options/loggeroptions.go index c554702c25..b837935812 100644 --- a/mongo/options/loggeroptions.go +++ b/mongo/options/loggeroptions.go @@ -7,7 +7,7 @@ package options import ( - "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/internal/logger" ) // LogLevel is an enumeration representing the supported log severity levels. diff --git a/mongo/options/mongooptions.go b/mongo/options/mongooptions.go index 81b87b6276..fd17ce44e1 100644 --- a/mongo/options/mongooptions.go +++ b/mongo/options/mongooptions.go @@ -11,9 +11,9 @@ import ( "reflect" "strconv" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // Collation allows users to specify language-specific rules for string comparison, such as diff --git a/mongo/options/runcmdoptions.go b/mongo/options/runcmdoptions.go index 12f8e81fc8..b0cdec32ce 100644 --- a/mongo/options/runcmdoptions.go +++ b/mongo/options/runcmdoptions.go @@ -7,7 +7,7 @@ package options import ( - "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/readpref" ) // RunCmdOptions represents options that can be used to configure a RunCommand operation. diff --git a/mongo/options/sessionoptions.go b/mongo/options/sessionoptions.go index c5bbe81124..e1eab098be 100644 --- a/mongo/options/sessionoptions.go +++ b/mongo/options/sessionoptions.go @@ -9,9 +9,9 @@ package options import ( "time" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) // DefaultCausalConsistency is the default value for the CausalConsistency option. diff --git a/mongo/options/transactionoptions.go b/mongo/options/transactionoptions.go index 31173768a0..9270cd20d4 100644 --- a/mongo/options/transactionoptions.go +++ b/mongo/options/transactionoptions.go @@ -9,9 +9,9 @@ package options import ( "time" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) // TransactionOptions represents options that can be used to configure a transaction. diff --git a/mongo/read_write_concern_spec_test.go b/mongo/read_write_concern_spec_test.go index d960656907..51d46b4c2a 100644 --- a/mongo/read_write_concern_spec_test.go +++ b/mongo/read_write_concern_spec_test.go @@ -14,13 +14,13 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" ) const ( diff --git a/mongo/readconcern/readconcern.go b/mongo/readconcern/readconcern.go index c5f3ad93d8..51408e142d 100644 --- a/mongo/readconcern/readconcern.go +++ b/mongo/readconcern/readconcern.go @@ -8,13 +8,13 @@ // // For more information about MongoDB read concerns, see // https://www.mongodb.com/docs/manual/reference/read-concern/ -package readconcern // import "go.mongodb.org/mongo-driver/v2/mongo/readconcern" +package readconcern // import "go.mongodb.org/mongo-driver/mongo/readconcern" import ( "errors" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // A ReadConcern defines a MongoDB read concern, which allows you to control the consistency and diff --git a/mongo/readconcern/readconcern_test.go b/mongo/readconcern/readconcern_test.go index 6dc1e1812f..2f6ea79f3e 100644 --- a/mongo/readconcern/readconcern_test.go +++ b/mongo/readconcern/readconcern_test.go @@ -9,9 +9,9 @@ package readconcern_test import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/readconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/readconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestReadConcern_MarshalBSONValue(t *testing.T) { diff --git a/mongo/readpref/mode_test.go b/mongo/readpref/mode_test.go index e92d4a35fb..572043f0ae 100644 --- a/mongo/readpref/mode_test.go +++ b/mongo/readpref/mode_test.go @@ -9,7 +9,7 @@ package readpref import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestMode_String(t *testing.T) { diff --git a/mongo/readpref/options.go b/mongo/readpref/options.go index f4671d5d36..c59b0705f1 100644 --- a/mongo/readpref/options.go +++ b/mongo/readpref/options.go @@ -10,7 +10,7 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/tag" ) // ErrInvalidTagSet indicates that an invalid set of tags was specified. diff --git a/mongo/readpref/options_example_test.go b/mongo/readpref/options_example_test.go index 9976c3c1f4..af4e220ae6 100644 --- a/mongo/readpref/options_example_test.go +++ b/mongo/readpref/options_example_test.go @@ -9,10 +9,10 @@ package readpref_test import ( "context" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/tag" ) // Configure a Client with a read preference that selects the nearest replica diff --git a/mongo/readpref/readpref.go b/mongo/readpref/readpref.go index 5b09732552..e2a1d7f340 100644 --- a/mongo/readpref/readpref.go +++ b/mongo/readpref/readpref.go @@ -5,7 +5,7 @@ // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 // Package readpref defines read preferences for MongoDB queries. -package readpref // import "go.mongodb.org/mongo-driver/v2/mongo/readpref" +package readpref // import "go.mongodb.org/mongo-driver/mongo/readpref" import ( "bytes" @@ -13,7 +13,7 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/tag" ) var ( diff --git a/mongo/readpref/readpref_test.go b/mongo/readpref/readpref_test.go index e0c7bf7d4b..d1ccb4554d 100644 --- a/mongo/readpref/readpref_test.go +++ b/mongo/readpref/readpref_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/tag" ) func TestPrimary(t *testing.T) { diff --git a/mongo/results.go b/mongo/results.go index d558d1f4ab..8408e8ba1b 100644 --- a/mongo/results.go +++ b/mongo/results.go @@ -9,9 +9,9 @@ package mongo import ( "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" ) // BulkWriteResult is the result type returned by a BulkWrite operation. diff --git a/mongo/results_test.go b/mongo/results_test.go index c752a0bd09..fd98e6b1dd 100644 --- a/mongo/results_test.go +++ b/mongo/results_test.go @@ -9,8 +9,8 @@ package mongo import ( "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestResults(t *testing.T) { diff --git a/mongo/session.go b/mongo/session.go index b7c81240a6..22aa026c9e 100644 --- a/mongo/session.go +++ b/mongo/session.go @@ -11,14 +11,14 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) // ErrWrongClient is returned when a user attempts to pass in a session created by a different client than diff --git a/mongo/single_result.go b/mongo/single_result.go index 21c9e9b37d..9c9b4f4fc6 100644 --- a/mongo/single_result.go +++ b/mongo/single_result.go @@ -11,9 +11,9 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsoncodec" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsoncodec" + "go.mongodb.org/mongo-driver/mongo/options" ) // ErrNoDocuments is returned by SingleResult methods when the operation that created the SingleResult did not return diff --git a/mongo/single_result_test.go b/mongo/single_result_test.go index 0f15b80c11..3e561208ce 100644 --- a/mongo/single_result_test.go +++ b/mongo/single_result_test.go @@ -12,10 +12,10 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/options" ) func TestSingleResult(t *testing.T) { diff --git a/mongo/with_transactions_test.go b/mongo/with_transactions_test.go index f722bdf0f3..743d6ef052 100644 --- a/mongo/with_transactions_test.go +++ b/mongo/with_transactions_test.go @@ -15,16 +15,16 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/readpref" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) var ( diff --git a/mongo/writeconcern/writeconcern.go b/mongo/writeconcern/writeconcern.go index 80a14c93a7..8e288d10b7 100644 --- a/mongo/writeconcern/writeconcern.go +++ b/mongo/writeconcern/writeconcern.go @@ -8,16 +8,16 @@ // // For more information about MongoDB write concerns, see // https://www.mongodb.com/docs/manual/reference/write-concern/ -package writeconcern // import "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" +package writeconcern // import "go.mongodb.org/mongo-driver/mongo/writeconcern" import ( "errors" "fmt" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) const majority = "majority" diff --git a/mongo/writeconcern/writeconcern_example_test.go b/mongo/writeconcern/writeconcern_example_test.go index 428862cfcb..dda4b15e9c 100644 --- a/mongo/writeconcern/writeconcern_example_test.go +++ b/mongo/writeconcern/writeconcern_example_test.go @@ -9,9 +9,9 @@ package writeconcern_test import ( "context" - "go.mongodb.org/mongo-driver/v2/mongo" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) // Configure a Client with write concern "majority" that requests diff --git a/mongo/writeconcern/writeconcern_test.go b/mongo/writeconcern/writeconcern_test.go index eabf095840..459e0eabe3 100644 --- a/mongo/writeconcern/writeconcern_test.go +++ b/mongo/writeconcern/writeconcern_test.go @@ -11,11 +11,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/writeconcern" ) func TestWriteConcernWithOptions(t *testing.T) { diff --git a/tag/tag.go b/tag/tag.go index ca458e5efa..4faff52549 100644 --- a/tag/tag.go +++ b/tag/tag.go @@ -8,7 +8,7 @@ // // For more information about read preference tags, see // https://www.mongodb.com/docs/manual/core/read-preference-tags/ -package tag // import "go.mongodb.org/mongo-driver/v2/tag" +package tag // import "go.mongodb.org/mongo-driver/tag" import ( "bytes" diff --git a/tag/tag_test.go b/tag/tag_test.go index cdd6ca6efe..45f29ad866 100644 --- a/tag/tag_test.go +++ b/tag/tag_test.go @@ -9,8 +9,8 @@ package tag import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" ) func TestTag_String(t *testing.T) { diff --git a/version/version.go b/version/version.go index 2eb4469b8b..ead90fa049 100644 --- a/version/version.go +++ b/version/version.go @@ -5,7 +5,7 @@ // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 // Package version defines the Go Driver version. -package version // import "go.mongodb.org/mongo-driver/v2/version" +package version // import "go.mongodb.org/mongo-driver/version" // Driver is the current version of the driver. var Driver = "v2.0.0-prerelease" diff --git a/x/bsonx/bsoncore/array_test.go b/x/bsonx/bsoncore/array_test.go index 6e6dbd03c0..8249d82808 100644 --- a/x/bsonx/bsoncore/array_test.go +++ b/x/bsonx/bsoncore/array_test.go @@ -14,7 +14,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) func TestArray(t *testing.T) { diff --git a/x/bsonx/bsoncore/bson_arraybuilder.go b/x/bsonx/bsoncore/bson_arraybuilder.go index 01985f51b7..7e6937d896 100644 --- a/x/bsonx/bsoncore/bson_arraybuilder.go +++ b/x/bsonx/bsoncore/bson_arraybuilder.go @@ -9,8 +9,8 @@ package bsoncore import ( "strconv" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // ArrayBuilder builds a bson array diff --git a/x/bsonx/bsoncore/bson_arraybuilder_test.go b/x/bsonx/bsoncore/bson_arraybuilder_test.go index 0d0d3d8a39..583e7e5136 100644 --- a/x/bsonx/bsoncore/bson_arraybuilder_test.go +++ b/x/bsonx/bsoncore/bson_arraybuilder_test.go @@ -13,7 +13,7 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/primitive" ) func TestArrayBuilder(t *testing.T) { diff --git a/x/bsonx/bsoncore/bson_documentbuilder.go b/x/bsonx/bsoncore/bson_documentbuilder.go index 8ddb6e83e2..52162f8aa0 100644 --- a/x/bsonx/bsoncore/bson_documentbuilder.go +++ b/x/bsonx/bsoncore/bson_documentbuilder.go @@ -7,8 +7,8 @@ package bsoncore import ( - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // DocumentBuilder builds a bson document diff --git a/x/bsonx/bsoncore/bson_documentbuilder_test.go b/x/bsonx/bsoncore/bson_documentbuilder_test.go index 54035190d1..021ff9d415 100644 --- a/x/bsonx/bsoncore/bson_documentbuilder_test.go +++ b/x/bsonx/bsoncore/bson_documentbuilder_test.go @@ -13,7 +13,7 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/primitive" ) func TestDocumentBuilder(t *testing.T) { diff --git a/x/bsonx/bsoncore/bsoncore.go b/x/bsonx/bsoncore/bsoncore.go index 7ca4788b33..e52674aacf 100644 --- a/x/bsonx/bsoncore/bsoncore.go +++ b/x/bsonx/bsoncore/bsoncore.go @@ -4,7 +4,7 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package bsoncore // import "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" +package bsoncore // import "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" import ( "bytes" @@ -14,8 +14,8 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) const ( diff --git a/x/bsonx/bsoncore/bsoncore_test.go b/x/bsonx/bsoncore/bsoncore_test.go index cffe917210..ace784c4a8 100644 --- a/x/bsonx/bsoncore/bsoncore_test.go +++ b/x/bsonx/bsoncore/bsoncore_test.go @@ -15,9 +15,9 @@ import ( "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/assert" ) func compareErrors(err1, err2 error) bool { diff --git a/x/bsonx/bsoncore/document.go b/x/bsonx/bsoncore/document.go index a83237f00c..3f360f1ae1 100644 --- a/x/bsonx/bsoncore/document.go +++ b/x/bsonx/bsoncore/document.go @@ -13,7 +13,7 @@ import ( "strconv" "strings" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // ValidationError is an error type returned when attempting to validate a document or array. diff --git a/x/bsonx/bsoncore/document_sequence.go b/x/bsonx/bsoncore/document_sequence.go index 3ebe75077a..e35bd0cd9a 100644 --- a/x/bsonx/bsoncore/document_sequence.go +++ b/x/bsonx/bsoncore/document_sequence.go @@ -10,7 +10,7 @@ import ( "errors" "io" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // DocumentSequenceStyle is used to represent how a document sequence is laid out in a slice of diff --git a/x/bsonx/bsoncore/document_test.go b/x/bsonx/bsoncore/document_test.go index 4bfcaac7eb..0d77b79d30 100644 --- a/x/bsonx/bsoncore/document_test.go +++ b/x/bsonx/bsoncore/document_test.go @@ -14,7 +14,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) func ExampleDocument_Validate() { diff --git a/x/bsonx/bsoncore/element.go b/x/bsonx/bsoncore/element.go index 2ebf34e2d4..1fe0897c91 100644 --- a/x/bsonx/bsoncore/element.go +++ b/x/bsonx/bsoncore/element.go @@ -10,7 +10,7 @@ import ( "bytes" "fmt" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) // MalformedElementError represents a class of errors that RawElement methods return. diff --git a/x/bsonx/bsoncore/element_test.go b/x/bsonx/bsoncore/element_test.go index 83984376f3..7b2f9e5baf 100644 --- a/x/bsonx/bsoncore/element_test.go +++ b/x/bsonx/bsoncore/element_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/bsontype" ) func TestElement(t *testing.T) { diff --git a/x/bsonx/bsoncore/value.go b/x/bsonx/bsoncore/value.go index 1406f778ee..69c1f9edbb 100644 --- a/x/bsonx/bsoncore/value.go +++ b/x/bsonx/bsoncore/value.go @@ -17,8 +17,8 @@ import ( "time" "unicode/utf8" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) // ElementTypeError specifies that a method to obtain a BSON value an incorrect type was called on a bson.Value. diff --git a/x/bsonx/bsoncore/value_test.go b/x/bsonx/bsoncore/value_test.go index 220d8a95b1..a9fdfb6663 100644 --- a/x/bsonx/bsoncore/value_test.go +++ b/x/bsonx/bsoncore/value_test.go @@ -12,8 +12,8 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/bson/primitive" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/bson/primitive" ) func TestValue(t *testing.T) { diff --git a/x/mongo/driver/auth/auth.go b/x/mongo/driver/auth/auth.go index e1ad0be59b..6eeaf0ee01 100644 --- a/x/mongo/driver/auth/auth.go +++ b/x/mongo/driver/auth/auth.go @@ -12,11 +12,11 @@ import ( "fmt" "net/http" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) // AuthenticatorFactory constructs an authenticator. diff --git a/x/mongo/driver/auth/auth_spec_test.go b/x/mongo/driver/auth/auth_spec_test.go index 9820c2f709..4e0e7e7ea6 100644 --- a/x/mongo/driver/auth/auth_spec_test.go +++ b/x/mongo/driver/auth/auth_spec_test.go @@ -13,9 +13,9 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/internal/spectest" - "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/internal/spectest" + "go.mongodb.org/mongo-driver/mongo/options" ) type credential struct { diff --git a/x/mongo/driver/auth/auth_test.go b/x/mongo/driver/auth/auth_test.go index 082401ed20..9145a21595 100644 --- a/x/mongo/driver/auth/auth_test.go +++ b/x/mongo/driver/auth/auth_test.go @@ -10,10 +10,10 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - . "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + . "go.mongodb.org/mongo-driver/x/mongo/driver/auth" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) func TestCreateAuthenticator(t *testing.T) { diff --git a/x/mongo/driver/auth/aws_conv.go b/x/mongo/driver/auth/aws_conv.go index 4a63acdbc3..616182d9cf 100644 --- a/x/mongo/driver/auth/aws_conv.go +++ b/x/mongo/driver/auth/aws_conv.go @@ -17,11 +17,11 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/primitive" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" - v4signer "go.mongodb.org/mongo-driver/v2/internal/aws/signer/v4" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/internal/aws/credentials" + v4signer "go.mongodb.org/mongo-driver/internal/aws/signer/v4" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) type clientState int diff --git a/x/mongo/driver/auth/conversation.go b/x/mongo/driver/auth/conversation.go index 7159f4e2be..fe8f472c96 100644 --- a/x/mongo/driver/auth/conversation.go +++ b/x/mongo/driver/auth/conversation.go @@ -9,7 +9,7 @@ package auth import ( "context" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // SpeculativeConversation represents an authentication conversation that can be merged with the initial connection diff --git a/x/mongo/driver/auth/creds/awscreds.go b/x/mongo/driver/auth/creds/awscreds.go index 36595c2090..06bba45343 100644 --- a/x/mongo/driver/auth/creds/awscreds.go +++ b/x/mongo/driver/auth/creds/awscreds.go @@ -11,9 +11,9 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" - "go.mongodb.org/mongo-driver/v2/internal/credproviders" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/credproviders" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) const ( diff --git a/x/mongo/driver/auth/creds/azurecreds.go b/x/mongo/driver/auth/creds/azurecreds.go index c6d4b473af..d8f105a9d9 100644 --- a/x/mongo/driver/auth/creds/azurecreds.go +++ b/x/mongo/driver/auth/creds/azurecreds.go @@ -11,9 +11,9 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" - "go.mongodb.org/mongo-driver/v2/internal/credproviders" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/credproviders" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // AzureCredentialProvider provides Azure credentials. diff --git a/x/mongo/driver/auth/creds/credscaching_test.go b/x/mongo/driver/auth/creds/credscaching_test.go index ad464fe7ed..3cca7de92d 100644 --- a/x/mongo/driver/auth/creds/credscaching_test.go +++ b/x/mongo/driver/auth/creds/credscaching_test.go @@ -17,9 +17,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" - "go.mongodb.org/mongo-driver/v2/internal/credproviders" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/credproviders" ) type pipeTransport struct { diff --git a/x/mongo/driver/auth/creds/gcpcreds.go b/x/mongo/driver/auth/creds/gcpcreds.go index f265bf857d..74f352e36e 100644 --- a/x/mongo/driver/auth/creds/gcpcreds.go +++ b/x/mongo/driver/auth/creds/gcpcreds.go @@ -14,7 +14,7 @@ import ( "net/http" "os" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // GCPCredentialProvider provides GCP credentials. diff --git a/x/mongo/driver/auth/gssapi.go b/x/mongo/driver/auth/gssapi.go index 23804e301a..4b860ba63f 100644 --- a/x/mongo/driver/auth/gssapi.go +++ b/x/mongo/driver/auth/gssapi.go @@ -15,7 +15,7 @@ import ( "fmt" "net" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth/internal/gssapi" + "go.mongodb.org/mongo-driver/x/mongo/driver/auth/internal/gssapi" ) // GSSAPI is the mechanism name for GSSAPI. diff --git a/x/mongo/driver/auth/gssapi_test.go b/x/mongo/driver/auth/gssapi_test.go index 2eb42ed72f..857d171ce5 100644 --- a/x/mongo/driver/auth/gssapi_test.go +++ b/x/mongo/driver/auth/gssapi_test.go @@ -13,8 +13,8 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/description" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/description" ) func TestGSSAPIAuthenticator(t *testing.T) { diff --git a/x/mongo/driver/auth/mongodbaws.go b/x/mongo/driver/auth/mongodbaws.go index 14fd637d97..7ae4b08998 100644 --- a/x/mongo/driver/auth/mongodbaws.go +++ b/x/mongo/driver/auth/mongodbaws.go @@ -10,9 +10,9 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" - "go.mongodb.org/mongo-driver/v2/internal/credproviders" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth/creds" + "go.mongodb.org/mongo-driver/internal/aws/credentials" + "go.mongodb.org/mongo-driver/internal/credproviders" + "go.mongodb.org/mongo-driver/x/mongo/driver/auth/creds" ) // MongoDBAWS is the mechanism name for MongoDBAWS. diff --git a/x/mongo/driver/auth/mongodbaws_test.go b/x/mongo/driver/auth/mongodbaws_test.go index ef72d7f29f..e066b0270d 100644 --- a/x/mongo/driver/auth/mongodbaws_test.go +++ b/x/mongo/driver/auth/mongodbaws_test.go @@ -10,7 +10,7 @@ import ( "errors" "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestGetRegion(t *testing.T) { diff --git a/x/mongo/driver/auth/mongodbcr.go b/x/mongo/driver/auth/mongodbcr.go index 91fbedd1f1..6e2c2f4dcb 100644 --- a/x/mongo/driver/auth/mongodbcr.go +++ b/x/mongo/driver/auth/mongodbcr.go @@ -16,10 +16,10 @@ import ( /* #nosec G501 */ "crypto/md5" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" ) // MONGODBCR is the mechanism name for MONGODB-CR. diff --git a/x/mongo/driver/auth/mongodbcr_test.go b/x/mongo/driver/auth/mongodbcr_test.go index 9465432404..e2f43b2f21 100644 --- a/x/mongo/driver/auth/mongodbcr_test.go +++ b/x/mongo/driver/auth/mongodbcr_test.go @@ -12,10 +12,10 @@ import ( "strings" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - . "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + . "go.mongodb.org/mongo-driver/x/mongo/driver/auth" + "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" ) func TestMongoDBCRAuthenticator_Fails(t *testing.T) { diff --git a/x/mongo/driver/auth/plain_test.go b/x/mongo/driver/auth/plain_test.go index b3da88e6e1..baaf175d85 100644 --- a/x/mongo/driver/auth/plain_test.go +++ b/x/mongo/driver/auth/plain_test.go @@ -13,11 +13,11 @@ import ( "encoding/base64" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - . "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + . "go.mongodb.org/mongo-driver/x/mongo/driver/auth" + "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" ) func TestPlainAuthenticator_Fails(t *testing.T) { diff --git a/x/mongo/driver/auth/sasl.go b/x/mongo/driver/auth/sasl.go index 7ab9cea76d..a7ae3368f0 100644 --- a/x/mongo/driver/auth/sasl.go +++ b/x/mongo/driver/auth/sasl.go @@ -10,10 +10,10 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" ) // SaslClient is the client piece of a sasl conversation. diff --git a/x/mongo/driver/auth/scram.go b/x/mongo/driver/auth/scram.go index 262b9a0025..f4f069699c 100644 --- a/x/mongo/driver/auth/scram.go +++ b/x/mongo/driver/auth/scram.go @@ -18,7 +18,7 @@ import ( "github.com/xdg-go/scram" "github.com/xdg-go/stringprep" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) const ( diff --git a/x/mongo/driver/auth/scram_test.go b/x/mongo/driver/auth/scram_test.go index 54409c6353..ef30a07364 100644 --- a/x/mongo/driver/auth/scram_test.go +++ b/x/mongo/driver/auth/scram_test.go @@ -10,10 +10,10 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" ) const ( diff --git a/x/mongo/driver/auth/speculative_scram_test.go b/x/mongo/driver/auth/speculative_scram_test.go index f9c7b682c8..a159891adc 100644 --- a/x/mongo/driver/auth/speculative_scram_test.go +++ b/x/mongo/driver/auth/speculative_scram_test.go @@ -11,12 +11,12 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" ) var ( diff --git a/x/mongo/driver/auth/speculative_x509_test.go b/x/mongo/driver/auth/speculative_x509_test.go index c4bd5f8ef1..cf46de6ffd 100644 --- a/x/mongo/driver/auth/speculative_x509_test.go +++ b/x/mongo/driver/auth/speculative_x509_test.go @@ -11,12 +11,12 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" ) var ( diff --git a/x/mongo/driver/auth/x509.go b/x/mongo/driver/auth/x509.go index 7aa064aaf0..03a9d750e2 100644 --- a/x/mongo/driver/auth/x509.go +++ b/x/mongo/driver/auth/x509.go @@ -9,9 +9,9 @@ package auth import ( "context" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" ) // MongoDBX509 is the mechanism name for MongoDBX509. diff --git a/x/mongo/driver/batch_cursor.go b/x/mongo/driver/batch_cursor.go index 06e3869c41..fefcfdb475 100644 --- a/x/mongo/driver/batch_cursor.go +++ b/x/mongo/driver/batch_cursor.go @@ -14,14 +14,14 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/codecutil" - "go.mongodb.org/mongo-driver/v2/internal/csot" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/codecutil" + "go.mongodb.org/mongo-driver/internal/csot" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) // ErrNoCursor is returned by NewCursorResponse when the database response does diff --git a/x/mongo/driver/batch_cursor_test.go b/x/mongo/driver/batch_cursor_test.go index ab1d186196..c57434cb83 100644 --- a/x/mongo/driver/batch_cursor_test.go +++ b/x/mongo/driver/batch_cursor_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/internal/assert" ) func TestBatchCursor(t *testing.T) { diff --git a/x/mongo/driver/batches.go b/x/mongo/driver/batches.go index 1161e0b5b2..3e7dca9ac1 100644 --- a/x/mongo/driver/batches.go +++ b/x/mongo/driver/batches.go @@ -9,7 +9,7 @@ package driver import ( "errors" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // ErrDocumentTooLarge occurs when a document that is larger than the maximum size accepted by a diff --git a/x/mongo/driver/batches_test.go b/x/mongo/driver/batches_test.go index 3bd17affcc..353368a33c 100644 --- a/x/mongo/driver/batches_test.go +++ b/x/mongo/driver/batches_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestBatches(t *testing.T) { diff --git a/x/mongo/driver/command_monitoring_test.go b/x/mongo/driver/command_monitoring_test.go index 441ae34615..7d0f30c136 100644 --- a/x/mongo/driver/command_monitoring_test.go +++ b/x/mongo/driver/command_monitoring_test.go @@ -9,9 +9,9 @@ package driver import ( "testing" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/handshake" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) func TestCommandMonitoring(t *testing.T) { diff --git a/x/mongo/driver/compression.go b/x/mongo/driver/compression.go index 1748a4db52..d79b024b74 100644 --- a/x/mongo/driver/compression.go +++ b/x/mongo/driver/compression.go @@ -15,7 +15,7 @@ import ( "github.com/golang/snappy" "github.com/klauspost/compress/zstd" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) // CompressionOpts holds settings for how to compress a payload diff --git a/x/mongo/driver/compression_test.go b/x/mongo/driver/compression_test.go index a1d1ed3a09..75a7ff072b 100644 --- a/x/mongo/driver/compression_test.go +++ b/x/mongo/driver/compression_test.go @@ -15,8 +15,8 @@ import ( "github.com/golang/snappy" "github.com/klauspost/compress/zstd" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) func TestCompression(t *testing.T) { diff --git a/x/mongo/driver/connstring/connstring.go b/x/mongo/driver/connstring/connstring.go index b20ff310a2..983c1dab22 100644 --- a/x/mongo/driver/connstring/connstring.go +++ b/x/mongo/driver/connstring/connstring.go @@ -4,7 +4,7 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package connstring // import "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" +package connstring // import "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" import ( "errors" @@ -15,10 +15,10 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/internal/randutil" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/dns" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/internal/randutil" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/mongo/driver/dns" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) var ( diff --git a/x/mongo/driver/connstring/connstring_spec_test.go b/x/mongo/driver/connstring/connstring_spec_test.go index 0abf8a6bb2..a5f646297c 100644 --- a/x/mongo/driver/connstring/connstring_spec_test.go +++ b/x/mongo/driver/connstring/connstring_spec_test.go @@ -16,9 +16,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/internal/spectest" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/internal/spectest" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" ) type host struct { diff --git a/x/mongo/driver/connstring/connstring_test.go b/x/mongo/driver/connstring/connstring_test.go index 2281890688..84c8ff1d45 100644 --- a/x/mongo/driver/connstring/connstring_test.go +++ b/x/mongo/driver/connstring/connstring_test.go @@ -11,9 +11,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" ) func TestAppName(t *testing.T) { diff --git a/x/mongo/driver/crypt.go b/x/mongo/driver/crypt.go index c319a559d1..4c254c03cf 100644 --- a/x/mongo/driver/crypt.go +++ b/x/mongo/driver/crypt.go @@ -14,10 +14,10 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" ) const ( diff --git a/x/mongo/driver/dns/dns.go b/x/mongo/driver/dns/dns.go index 7899e4ca54..848554d3a1 100644 --- a/x/mongo/driver/dns/dns.go +++ b/x/mongo/driver/dns/dns.go @@ -81,7 +81,7 @@ func (r *Resolver) fetchSeedlistFromSRV(host string, srvName string, stopOnErr b } _, addresses, err := r.LookupSRV(srvName, "tcp", host) if err != nil && strings.Contains(err.Error(), "cannot unmarshal DNS message") { - return nil, fmt.Errorf("see https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/mongo#hdr-Potential_DNS_Issues: %w", err) + return nil, fmt.Errorf("see https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#hdr-Potential_DNS_Issues: %w", err) } else if err != nil { return nil, err } diff --git a/x/mongo/driver/driver.go b/x/mongo/driver/driver.go index fb3190e1b8..5fd3ddcb42 100644 --- a/x/mongo/driver/driver.go +++ b/x/mongo/driver/driver.go @@ -4,17 +4,17 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package driver // import "go.mongodb.org/mongo-driver/v2/x/mongo/driver" +package driver // import "go.mongodb.org/mongo-driver/x/mongo/driver" import ( "context" "time" - "go.mongodb.org/mongo-driver/v2/internal/csot" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/internal/csot" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) // Deployment is implemented by types that can select a server from a deployment. diff --git a/x/mongo/driver/drivertest/channel_conn.go b/x/mongo/driver/drivertest/channel_conn.go index 8c0d561b11..27be4c264d 100644 --- a/x/mongo/driver/drivertest/channel_conn.go +++ b/x/mongo/driver/drivertest/channel_conn.go @@ -10,10 +10,10 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/v2/mongo/address" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" ) // ChannelConn implements the driver.Connection interface by reading and writing wire messages diff --git a/x/mongo/driver/errors.go b/x/mongo/driver/errors.go index 02198feea5..177aa1234b 100644 --- a/x/mongo/driver/errors.go +++ b/x/mongo/driver/errors.go @@ -13,9 +13,9 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) // LegacyNotPrimaryErrMsg is the error message that older MongoDB servers (see diff --git a/x/mongo/driver/integration/aggregate_test.go b/x/mongo/driver/integration/aggregate_test.go index 75acc042ee..95a9b821ae 100644 --- a/x/mongo/driver/integration/aggregate_test.go +++ b/x/mongo/driver/integration/aggregate_test.go @@ -12,16 +12,16 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/event" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) func setUpMonitor() (*event.CommandMonitor, chan *event.CommandStartedEvent, chan *event.CommandSucceededEvent, chan *event.CommandFailedEvent) { diff --git a/x/mongo/driver/integration/compressor_test.go b/x/mongo/driver/integration/compressor_test.go index 43c4dd5731..16f809cb80 100644 --- a/x/mongo/driver/integration/compressor_test.go +++ b/x/mongo/driver/integration/compressor_test.go @@ -11,12 +11,12 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" ) func TestCompression(t *testing.T) { diff --git a/x/mongo/driver/integration/insert_test.go b/x/mongo/driver/integration/insert_test.go index a2687e8dfe..e804967e28 100644 --- a/x/mongo/driver/integration/insert_test.go +++ b/x/mongo/driver/integration/insert_test.go @@ -10,10 +10,10 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) func TestInsert(t *testing.T) { diff --git a/x/mongo/driver/integration/main_test.go b/x/mongo/driver/integration/main_test.go index 5ad3d0947a..ef6331853d 100644 --- a/x/mongo/driver/integration/main_test.go +++ b/x/mongo/driver/integration/main_test.go @@ -14,16 +14,16 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/internal/require" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/x/mongo/driver/auth" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) var host *string diff --git a/x/mongo/driver/integration/scram_test.go b/x/mongo/driver/integration/scram_test.go index d806ceae3e..18d99a5c40 100644 --- a/x/mongo/driver/integration/scram_test.go +++ b/x/mongo/driver/integration/scram_test.go @@ -12,13 +12,13 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/v2/bson/bsontype" - "go.mongodb.org/mongo-driver/v2/internal/integtest" - "go.mongodb.org/mongo-driver/v2/mongo/description" - "go.mongodb.org/mongo-driver/v2/mongo/options" - "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/bson/bsontype" + "go.mongodb.org/mongo-driver/internal/integtest" + "go.mongodb.org/mongo-driver/mongo/description" + "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver" ) type scramTestCase struct { diff --git a/x/mongo/driver/mongocrypt/mongocrypt.go b/x/mongo/driver/mongocrypt/mongocrypt.go index db2c6a7609..20f6ff0aa9 100644 --- a/x/mongo/driver/mongocrypt/mongocrypt.go +++ b/x/mongo/driver/mongocrypt/mongocrypt.go @@ -22,11 +22,11 @@ import ( "net/http" "unsafe" - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/httputil" - "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth/creds" - "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/httputil" + "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/x/mongo/driver/auth/creds" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" ) type kmsProvider interface { diff --git a/x/mongo/driver/mongocrypt/mongocrypt_context.go b/x/mongo/driver/mongocrypt/mongocrypt_context.go index 5a34516533..04e98d01c1 100644 --- a/x/mongo/driver/mongocrypt/mongocrypt_context.go +++ b/x/mongo/driver/mongocrypt/mongocrypt_context.go @@ -12,7 +12,7 @@ package mongocrypt // #include