diff --git a/bson/array_codec.go b/bson/array_codec.go index 4a53d376bc..4642fb6ea2 100644 --- a/bson/array_codec.go +++ b/bson/array_codec.go @@ -9,7 +9,7 @@ package bson import ( "reflect" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // arrayCodec is the Codec used for bsoncore.Array values. diff --git a/bson/bson_corpus_spec_test.go b/bson/bson_corpus_spec_test.go index 90343df7e9..a0d5a5aa38 100644 --- a/bson/bson_corpus_spec_test.go +++ b/bson/bson_corpus_spec_test.go @@ -21,8 +21,8 @@ import ( "unicode/utf8" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/require" ) type testCase struct { diff --git a/bson/bson_test.go b/bson/bson_test.go index db51caface..6c45743b1d 100644 --- a/bson/bson_test.go +++ b/bson/bson_test.go @@ -17,9 +17,9 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func noerr(t *testing.T, err error) { diff --git a/bson/bsonrw_test.go b/bson/bsonrw_test.go index 297d1b6c0b..ea98925a09 100644 --- a/bson/bsonrw_test.go +++ b/bson/bsonrw_test.go @@ -9,7 +9,7 @@ package bson import ( "testing" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) var ( diff --git a/bson/cond_addr_codec_test.go b/bson/cond_addr_codec_test.go index 3125214f30..87a7d60783 100644 --- a/bson/cond_addr_codec_test.go +++ b/bson/cond_addr_codec_test.go @@ -10,7 +10,7 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestCondAddrCodec(t *testing.T) { diff --git a/bson/copier.go b/bson/copier.go index d4b3697407..12f00dd0ef 100644 --- a/bson/copier.go +++ b/bson/copier.go @@ -11,7 +11,7 @@ import ( "fmt" "io" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // copyDocument handles copying one document from the src to the dst. diff --git a/bson/copier_test.go b/bson/copier_test.go index f0939aa20a..2a9f2297b7 100644 --- a/bson/copier_test.go +++ b/bson/copier_test.go @@ -12,8 +12,8 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestCopier(t *testing.T) { diff --git a/bson/decimal.go b/bson/decimal.go index 7133c235ee..34a919c46a 100644 --- a/bson/decimal.go +++ b/bson/decimal.go @@ -18,7 +18,7 @@ import ( "strconv" "strings" - "go.mongodb.org/mongo-driver/internal/decimal128" + "go.mongodb.org/mongo-driver/v2/internal/decimal128" ) // These constants are the maximum and minimum values for the exponent field in a decimal128 value. diff --git a/bson/decimal_test.go b/bson/decimal_test.go index cdd3318f26..336b5a8a00 100644 --- a/bson/decimal_test.go +++ b/bson/decimal_test.go @@ -12,8 +12,8 @@ import ( "math/big" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/require" ) type bigIntTestCase struct { diff --git a/bson/decoder_example_test.go b/bson/decoder_example_test.go index f87a107b0b..1f89c52a29 100644 --- a/bson/decoder_example_test.go +++ b/bson/decoder_example_test.go @@ -13,7 +13,7 @@ import ( "fmt" "io" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func ExampleDecoder() { diff --git a/bson/decoder_test.go b/bson/decoder_test.go index 9c917e6727..7cc71bebeb 100644 --- a/bson/decoder_test.go +++ b/bson/decoder_test.go @@ -13,9 +13,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func TestBasicDecode(t *testing.T) { diff --git a/bson/default_value_decoders.go b/bson/default_value_decoders.go index cd24ca0176..2786a71b55 100644 --- a/bson/default_value_decoders.go +++ b/bson/default_value_decoders.go @@ -15,7 +15,7 @@ import ( "reflect" "strconv" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) var errCannotTruncate = errors.New("float64 can only be truncated to a lower precision type when truncation is enabled") diff --git a/bson/default_value_decoders_test.go b/bson/default_value_decoders_test.go index 8fd4d69ae2..9053c2122a 100644 --- a/bson/default_value_decoders_test.go +++ b/bson/default_value_decoders_test.go @@ -18,8 +18,8 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestDefaultValueDecoders(t *testing.T) { diff --git a/bson/default_value_encoders.go b/bson/default_value_encoders.go index 0b869324ad..9835738be3 100644 --- a/bson/default_value_encoders.go +++ b/bson/default_value_encoders.go @@ -14,7 +14,7 @@ import ( "reflect" "sync" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) var bvwPool = sync.Pool{ diff --git a/bson/default_value_encoders_test.go b/bson/default_value_encoders_test.go index 9898e96981..296d8345fb 100644 --- a/bson/default_value_encoders_test.go +++ b/bson/default_value_encoders_test.go @@ -18,8 +18,8 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) type myInterface interface { diff --git a/bson/encoder_example_test.go b/bson/encoder_example_test.go index 5c34192db4..887acc3a8d 100644 --- a/bson/encoder_example_test.go +++ b/bson/encoder_example_test.go @@ -12,7 +12,7 @@ import ( "fmt" "io" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func ExampleEncoder() { diff --git a/bson/encoder_test.go b/bson/encoder_test.go index 03958273bd..a173653a4e 100644 --- a/bson/encoder_test.go +++ b/bson/encoder_test.go @@ -12,9 +12,9 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func TestBasicEncode(t *testing.T) { diff --git a/bson/example_test.go b/bson/example_test.go index a534de9cf9..5b5a429701 100644 --- a/bson/example_test.go +++ b/bson/example_test.go @@ -10,7 +10,7 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/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 9177a4e3fe..aaf47151d0 100644 --- a/bson/extjson_prose_test.go +++ b/bson/extjson_prose_test.go @@ -10,7 +10,7 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestExtJSON(t *testing.T) { diff --git a/bson/extjson_reader_test.go b/bson/extjson_reader_test.go index a3a2d67cd5..f38e56709c 100644 --- a/bson/extjson_reader_test.go +++ b/bson/extjson_reader_test.go @@ -14,7 +14,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestExtJSONReader(t *testing.T) { diff --git a/bson/extjson_writer_test.go b/bson/extjson_writer_test.go index e5fe87bf73..964b7f29f6 100644 --- a/bson/extjson_writer_test.go +++ b/bson/extjson_writer_test.go @@ -13,7 +13,7 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestExtJSONValueWriter(t *testing.T) { diff --git a/bson/marshal_test.go b/bson/marshal_test.go index ecf67d8493..083da2aa20 100644 --- a/bson/marshal_test.go +++ b/bson/marshal_test.go @@ -16,9 +16,9 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func TestMarshalWithRegistry(t *testing.T) { diff --git a/bson/marshal_value_cases_test.go b/bson/marshal_value_cases_test.go index 289aa3543f..52c85c0757 100644 --- a/bson/marshal_value_cases_test.go +++ b/bson/marshal_value_cases_test.go @@ -10,8 +10,8 @@ import ( "io" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/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 1cfd20fd49..b2595bb670 100644 --- a/bson/marshal_value_test.go +++ b/bson/marshal_value_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestMarshalValue(t *testing.T) { diff --git a/bson/mgocompat/bson_test.go b/bson/mgocompat/bson_test.go index e49bb99a8b..909d316717 100644 --- a/bson/mgocompat/bson_test.go +++ b/bson/mgocompat/bson_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/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 7ffb90b22e..c089a7258f 100644 --- a/bson/mgocompat/registry.go +++ b/bson/mgocompat/registry.go @@ -7,7 +7,7 @@ package mgocompat import ( - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // Registry is the mgo compatible bson.Registry. It contains the default and diff --git a/bson/objectid_test.go b/bson/objectid_test.go index f7291c5a2c..52540a4324 100644 --- a/bson/objectid_test.go +++ b/bson/objectid_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/require" ) func TestString(t *testing.T) { diff --git a/bson/primitive_codecs_test.go b/bson/primitive_codecs_test.go index 103a4774bf..426fa8d326 100644 --- a/bson/primitive_codecs_test.go +++ b/bson/primitive_codecs_test.go @@ -17,8 +17,8 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func bytesFromDoc(doc interface{}) []byte { diff --git a/bson/raw.go b/bson/raw.go index cd5dab20be..1c49faee68 100644 --- a/bson/raw.go +++ b/bson/raw.go @@ -10,7 +10,7 @@ import ( "errors" "io" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // ErrNilReader indicates that an operation was attempted on a nil bson.Reader. diff --git a/bson/raw_array.go b/bson/raw_array.go index d0aa142f20..1d2e9be7b7 100644 --- a/bson/raw_array.go +++ b/bson/raw_array.go @@ -9,7 +9,7 @@ package bson import ( "io" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // RawArray is a raw bytes representation of a BSON array. diff --git a/bson/raw_array_test.go b/bson/raw_array_test.go index 9508416364..64bd8fc8ae 100644 --- a/bson/raw_array_test.go +++ b/bson/raw_array_test.go @@ -15,9 +15,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func TestReadArray(t *testing.T) { diff --git a/bson/raw_element.go b/bson/raw_element.go index 8ce13c2cc7..75a00350e3 100644 --- a/bson/raw_element.go +++ b/bson/raw_element.go @@ -7,7 +7,7 @@ package bson import ( - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/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 bb65f0ccb2..c5c527ee8c 100644 --- a/bson/raw_test.go +++ b/bson/raw_test.go @@ -16,9 +16,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func ExampleRaw_Validate() { diff --git a/bson/raw_value.go b/bson/raw_value.go index a32b82e41d..8b0390c725 100644 --- a/bson/raw_value.go +++ b/bson/raw_value.go @@ -13,7 +13,7 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/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 e6b5c24b96..cabb18bfe9 100644 --- a/bson/raw_value_test.go +++ b/bson/raw_value_test.go @@ -12,8 +12,8 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestRawValue(t *testing.T) { diff --git a/bson/registry_examples_test.go b/bson/registry_examples_test.go index a2c5bac2b0..afbdcadb3f 100644 --- a/bson/registry_examples_test.go +++ b/bson/registry_examples_test.go @@ -12,7 +12,7 @@ import ( "math" "reflect" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func ExampleRegistry_customEncoder() { diff --git a/bson/registry_test.go b/bson/registry_test.go index 40d65c8741..f07f6b5f3f 100644 --- a/bson/registry_test.go +++ b/bson/registry_test.go @@ -12,7 +12,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) // newTestRegistry creates a new Registry. diff --git a/bson/struct_codec_test.go b/bson/struct_codec_test.go index 156535b14e..e434079e60 100644 --- a/bson/struct_codec_test.go +++ b/bson/struct_codec_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) var _ Zeroer = testZeroer{} diff --git a/bson/time_codec_test.go b/bson/time_codec_test.go index 1bb35bafd3..284151f7a0 100644 --- a/bson/time_codec_test.go +++ b/bson/time_codec_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestTimeCodec(t *testing.T) { diff --git a/bson/truncation_test.go b/bson/truncation_test.go index c1ddbb17c9..1e53474dd5 100644 --- a/bson/truncation_test.go +++ b/bson/truncation_test.go @@ -10,7 +10,7 @@ import ( "bytes" "testing" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) type inputArgs struct { diff --git a/bson/types.go b/bson/types.go index 1213f8ddc6..dedc95a596 100644 --- a/bson/types.go +++ b/bson/types.go @@ -12,7 +12,7 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // Type represents a BSON type. diff --git a/bson/unmarshal_test.go b/bson/unmarshal_test.go index ea1b04dd36..7ba0d94b97 100644 --- a/bson/unmarshal_test.go +++ b/bson/unmarshal_test.go @@ -12,8 +12,8 @@ import ( "sync" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestUnmarshal(t *testing.T) { diff --git a/bson/unmarshal_value_test.go b/bson/unmarshal_value_test.go index 716fc3aa6e..a4d80e04ea 100644 --- a/bson/unmarshal_value_test.go +++ b/bson/unmarshal_value_test.go @@ -11,8 +11,8 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestUnmarshalValue(t *testing.T) { diff --git a/bson/value_reader_test.go b/bson/value_reader_test.go index c1c5de5ef5..c1abe7e1d2 100644 --- a/bson/value_reader_test.go +++ b/bson/value_reader_test.go @@ -15,8 +15,8 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestValueReader(t *testing.T) { diff --git a/bson/value_reader_writer_test.go b/bson/value_reader_writer_test.go index d5b3edb697..20d00e93c7 100644 --- a/bson/value_reader_writer_test.go +++ b/bson/value_reader_writer_test.go @@ -9,7 +9,7 @@ package bson import ( "testing" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) type VRWInvoked byte diff --git a/bson/value_writer.go b/bson/value_writer.go index bbcdbc5764..574132e115 100644 --- a/bson/value_writer.go +++ b/bson/value_writer.go @@ -15,7 +15,7 @@ import ( "strings" "sync" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) var _ ValueWriter = &valueWriter{} diff --git a/bson/value_writer_test.go b/bson/value_writer_test.go index 0db2b040ff..c463bc8dec 100644 --- a/bson/value_writer_test.go +++ b/bson/value_writer_test.go @@ -16,8 +16,8 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestNewValueWriter(t *testing.T) { diff --git a/event/description.go b/event/description.go index 682d61c1c9..d605b9707d 100644 --- a/event/description.go +++ b/event/description.go @@ -9,9 +9,9 @@ package event import ( "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/tag" ) // ServerDescription contains information about a node in a cluster. This is diff --git a/event/examples_test.go b/event/examples_test.go index 7c151d2a9e..90a08e39b5 100644 --- a/event/examples_test.go +++ b/event/examples_test.go @@ -10,10 +10,10 @@ import ( "context" "log" - "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" + "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" ) // Event examples diff --git a/event/monitoring.go b/event/monitoring.go index a41da0172a..eb464c4854 100644 --- a/event/monitoring.go +++ b/event/monitoring.go @@ -10,8 +10,8 @@ import ( "context" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/address" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/address" ) // CommandStartedEvent represents an event generated when a command is sent to a server. diff --git a/go.mod b/go.mod index 2ec0a5a923..45008044d4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.org/mongo-driver +module go.mongodb.org/mongo-driver/v2 go 1.18 diff --git a/internal/assert/assertion_compare_go1.17_test.go b/internal/assert/assertion_compare_go1.17_test.go index 4953ca3820..49ce4599ee 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/internal/assert.Greater") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.GreaterOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.Less") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.LessOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.LessOrEqual") } } diff --git a/internal/assert/assertion_compare_test.go b/internal/assert/assertion_compare_test.go index ef8862ee67..36acdd87f4 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/internal/assert.Greater") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.GreaterOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.Less") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.LessOrEqual") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.Positive") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/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/internal/assert.Negative") + Contains(t, out.helpers, "go.mongodb.org/mongo-driver/v2/internal/assert.Negative") } } diff --git a/internal/assert/assertion_mongo_test.go b/internal/assert/assertion_mongo_test.go index 3f16af10ec..9fe6f485d5 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/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func TestDifferentAddressRanges(t *testing.T) { diff --git a/internal/aws/credentials/chain_provider.go b/internal/aws/credentials/chain_provider.go index 6843927153..942c7690fa 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/internal/aws/awserr" + "go.mongodb.org/mongo-driver/v2/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 2e731338fb..3680b78105 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/internal/aws/awserr" + "go.mongodb.org/mongo-driver/v2/internal/aws/awserr" ) type secondStubProvider struct { diff --git a/internal/aws/credentials/credentials.go b/internal/aws/credentials/credentials.go index 53181aa163..919d0819b1 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/internal/aws/awserr" + "go.mongodb.org/mongo-driver/v2/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 d964ea419f..e10848c7ac 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/internal/aws/awserr" + "go.mongodb.org/mongo-driver/v2/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 6cf4586bb9..eaf5cca3ee 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/internal/aws" - "go.mongodb.org/mongo-driver/internal/aws/credentials" + "go.mongodb.org/mongo-driver/v2/internal/aws" + "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" ) const ( diff --git a/internal/aws/signer/v4/v4_test.go b/internal/aws/signer/v4/v4_test.go index 51966b96db..8497574261 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/internal/aws" - "go.mongodb.org/mongo-driver/internal/aws/credentials" - "go.mongodb.org/mongo-driver/internal/credproviders" + "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" ) func epochTime() time.Time { return time.Unix(0, 0) } diff --git a/internal/bsonutil/bsonutil.go b/internal/bsonutil/bsonutil.go index d3085d5de0..1eba9c24c3 100644 --- a/internal/bsonutil/bsonutil.go +++ b/internal/bsonutil/bsonutil.go @@ -9,7 +9,7 @@ package bsonutil import ( "fmt" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // StringSliceFromRawValue decodes the provided BSON value into a []string. This function returns an error if the value diff --git a/internal/cmd/build-oss-fuzz-corpus/main.go b/internal/cmd/build-oss-fuzz-corpus/main.go index 4dc014b5aa..547103c805 100644 --- a/internal/cmd/build-oss-fuzz-corpus/main.go +++ b/internal/cmd/build-oss-fuzz-corpus/main.go @@ -19,7 +19,7 @@ import ( "path" "path/filepath" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) const dataDir = "testdata/bson-corpus/" diff --git a/internal/cmd/compilecheck/go.mod b/internal/cmd/compilecheck/go.mod index 3b2992092c..9c8d6fe95b 100644 --- a/internal/cmd/compilecheck/go.mod +++ b/internal/cmd/compilecheck/go.mod @@ -2,12 +2,11 @@ module go.mongodb.go/mongo-driver/internal/cmd/compilecheck go 1.18 -replace go.mongodb.org/mongo-driver => ../../../ +replace go.mongodb.org/mongo-driver/v2 => ../../../ // Note that the Go driver version is replaced with the local Go driver code by // the replace directive above. -//require go.mongodb.org/mongo-driver -require go.mongodb.org/mongo-driver v1.11.7 +require go.mongodb.org/mongo-driver/v2 v2.0.0-alpha1 require ( github.com/golang/snappy v0.0.4 // indirect diff --git a/internal/cmd/compilecheck/main.go b/internal/cmd/compilecheck/main.go index cb35d6133d..49923a44f2 100644 --- a/internal/cmd/compilecheck/main.go +++ b/internal/cmd/compilecheck/main.go @@ -9,9 +9,9 @@ package main import ( "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/bson/v2" + "go.mongodb.org/mongo-driver/mongo/options/v2" + "go.mongodb.org/mongo-driver/mongo/v2" ) func main() { diff --git a/internal/cmd/testatlas/atlas_test.go b/internal/cmd/testatlas/atlas_test.go index a8753a257f..466b0b4233 100644 --- a/internal/cmd/testatlas/atlas_test.go +++ b/internal/cmd/testatlas/atlas_test.go @@ -15,11 +15,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/handshake" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/handshake" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestMain(m *testing.M) { diff --git a/internal/cmd/testaws/main.go b/internal/cmd/testaws/main.go index 4bdf50c340..0b037bd09c 100644 --- a/internal/cmd/testaws/main.go +++ b/internal/cmd/testaws/main.go @@ -12,9 +12,9 @@ import ( "fmt" "os" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func main() { diff --git a/internal/cmd/testentauth/main.go b/internal/cmd/testentauth/main.go index bcb2e6a427..c073dc3175 100644 --- a/internal/cmd/testentauth/main.go +++ b/internal/cmd/testentauth/main.go @@ -12,9 +12,9 @@ import ( "os" "time" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" ) func main() { diff --git a/internal/cmd/testkms/main.go b/internal/cmd/testkms/main.go index 3e83072e1e..50c88e1ea1 100644 --- a/internal/cmd/testkms/main.go +++ b/internal/cmd/testkms/main.go @@ -12,9 +12,9 @@ import ( "os" "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) var datakeyopts = map[string]bson.M{ diff --git a/internal/codecutil/encoding.go b/internal/codecutil/encoding.go index 2aaf8f2719..5fa031efb9 100644 --- a/internal/codecutil/encoding.go +++ b/internal/codecutil/encoding.go @@ -13,8 +13,8 @@ import ( "io" "reflect" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/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 adbb2e5363..cfc6f4af39 100644 --- a/internal/codecutil/encoding_test.go +++ b/internal/codecutil/encoding_test.go @@ -10,8 +10,8 @@ import ( "io" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func testEncFn(t *testing.T) EncoderFn { diff --git a/internal/credproviders/assume_role_provider.go b/internal/credproviders/assume_role_provider.go index 3a95cf401d..eec2247c70 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/internal/aws/credentials" - "go.mongodb.org/mongo-driver/internal/uuid" + "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" + "go.mongodb.org/mongo-driver/v2/internal/uuid" ) const ( diff --git a/internal/credproviders/ec2_provider.go b/internal/credproviders/ec2_provider.go index 771bfca134..df15a7f2c3 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/internal/aws/credentials" + "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" ) const ( diff --git a/internal/credproviders/ecs_provider.go b/internal/credproviders/ecs_provider.go index 0c3a27e626..6816a3182d 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/internal/aws/credentials" + "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" ) const ( diff --git a/internal/credproviders/env_provider.go b/internal/credproviders/env_provider.go index 59ca633635..cf6bb60b31 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/internal/aws/credentials" + "go.mongodb.org/mongo-driver/v2/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 96dad1a829..f3674c727b 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/internal/aws/credentials" + "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" ) const ( diff --git a/internal/credproviders/static_provider.go b/internal/credproviders/static_provider.go index 6b49613941..bbb0e8033a 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/internal/aws/credentials" + "go.mongodb.org/mongo-driver/v2/internal/aws/credentials" ) // staticProviderName provides a name of Static provider diff --git a/internal/csfle/csfle.go b/internal/csfle/csfle.go index 20a6d43a0d..7a91045a31 100644 --- a/internal/csfle/csfle.go +++ b/internal/csfle/csfle.go @@ -10,7 +10,7 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) const ( diff --git a/internal/csot/csot_test.go b/internal/csot/csot_test.go index 5b79f6994a..e26857121c 100644 --- a/internal/csot/csot_test.go +++ b/internal/csot/csot_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/ptrutil" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/ptrutil" ) func newTestContext(t *testing.T, timeout time.Duration) context.Context { diff --git a/internal/docexamples/examples.go b/internal/docexamples/examples.go index 7d5d3dc811..4a3723eee3 100644 --- a/internal/docexamples/examples.go +++ b/internal/docexamples/examples.go @@ -16,14 +16,14 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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" ) func requireCursorLength(t *testing.T, cursor *mongo.Cursor, length int) { diff --git a/internal/docexamples/examples_test.go b/internal/docexamples/examples_test.go index 5c3a68eef4..ab42782b61 100644 --- a/internal/docexamples/examples_test.go +++ b/internal/docexamples/examples_test.go @@ -14,11 +14,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/docexamples" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/docexamples" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestMain(m *testing.M) { diff --git a/internal/driverutil/description.go b/internal/driverutil/description.go index 6c04ec0b0a..f0ab6ab846 100644 --- a/internal/driverutil/description.go +++ b/internal/driverutil/description.go @@ -11,13 +11,13 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "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" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/bson" + "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/v2/x/mongo/driver/description" ) func equalWireVersion(wv1, wv2 *description.VersionRange) bool { diff --git a/internal/errutil/join_test.go b/internal/errutil/join_test.go index 333c2e9a2f..61a419c5c0 100644 --- a/internal/errutil/join_test.go +++ b/internal/errutil/join_test.go @@ -12,7 +12,7 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) // TestJoin_Nil asserts that join returns a nil error for the same inputs that diff --git a/internal/eventtest/eventtest.go b/internal/eventtest/eventtest.go index 1158d69933..237a7a9b12 100644 --- a/internal/eventtest/eventtest.go +++ b/internal/eventtest/eventtest.go @@ -11,7 +11,7 @@ package eventtest import ( "sync" - "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/v2/event" ) // TestPoolMonitor exposes an *event.TestPoolMonitor and collects all events logged to that diff --git a/internal/integration/causal_consistency_test.go b/internal/integration/causal_consistency_test.go index 25a33466f2..2f997f956e 100644 --- a/internal/integration/causal_consistency_test.go +++ b/internal/integration/causal_consistency_test.go @@ -10,12 +10,12 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/mongo/readconcern" ) // set of operations that support read concerns taken from read/write concern spec. diff --git a/internal/integration/change_stream_test.go b/internal/integration/change_stream_test.go index f142d2c742..ffe655ccf8 100644 --- a/internal/integration/change_stream_test.go +++ b/internal/integration/change_stream_test.go @@ -13,14 +13,14 @@ import ( "testing" "time" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/eventtest" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) type resumeType int diff --git a/internal/integration/clam_prose_test.go b/internal/integration/clam_prose_test.go index 54d49df11b..00dc670b13 100644 --- a/internal/integration/clam_prose_test.go +++ b/internal/integration/clam_prose_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "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/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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/options" ) var ErrInvalidTruncation = fmt.Errorf("invalid truncation") diff --git a/internal/integration/client_options_test.go b/internal/integration/client_options_test.go index 4287842149..5a771076a5 100644 --- a/internal/integration/client_options_test.go +++ b/internal/integration/client_options_test.go @@ -12,11 +12,11 @@ import ( "sync/atomic" "testing" - "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" + "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" ) func TestClientOptions_CustomDialer(t *testing.T) { diff --git a/internal/integration/client_side_encryption_prose_test.go b/internal/integration/client_side_encryption_prose_test.go index 3fb7fd649a..023e8c6900 100644 --- a/internal/integration/client_side_encryption_prose_test.go +++ b/internal/integration/client_side_encryption_prose_test.go @@ -24,18 +24,18 @@ import ( "testing" "time" - "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/handshake" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "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/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" + "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/handshake" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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/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" ) var ( diff --git a/internal/integration/client_side_encryption_test.go b/internal/integration/client_side_encryption_test.go index 0b1e5b1db8..1111a71021 100644 --- a/internal/integration/client_side_encryption_test.go +++ b/internal/integration/client_side_encryption_test.go @@ -13,16 +13,16 @@ import ( "context" "testing" - "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/integration/mtest" - "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/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - mcopts "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" + "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/integration/mtest" + "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/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + mcopts "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" ) // createDataKeyAndEncrypt creates a data key with the alternate name @keyName. diff --git a/internal/integration/client_test.go b/internal/integration/client_test.go index 05b19c53a5..37b37199cb 100644 --- a/internal/integration/client_test.go +++ b/internal/integration/client_test.go @@ -16,20 +16,20 @@ import ( "testing" "time" - "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/handshake" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "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" - "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" + "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/handshake" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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/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" "golang.org/x/sync/errgroup" ) diff --git a/internal/integration/cmd_monitoring_helpers_test.go b/internal/integration/cmd_monitoring_helpers_test.go index 6ffdd9960b..e4afa1a08d 100644 --- a/internal/integration/cmd_monitoring_helpers_test.go +++ b/internal/integration/cmd_monitoring_helpers_test.go @@ -13,11 +13,11 @@ import ( "fmt" "strings" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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/integration/mtest" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // Helper functions to compare BSON values and command monitoring expectations. diff --git a/internal/integration/collection_test.go b/internal/integration/collection_test.go index 09209e5bb7..eef3999793 100644 --- a/internal/integration/collection_test.go +++ b/internal/integration/collection_test.go @@ -11,14 +11,14 @@ import ( "strings" "testing" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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/v2/x/bsonx/bsoncore" ) const ( diff --git a/internal/integration/crud_helpers_test.go b/internal/integration/crud_helpers_test.go index 2ef4632f11..88b86072a3 100644 --- a/internal/integration/crud_helpers_test.go +++ b/internal/integration/crud_helpers_test.go @@ -15,18 +15,18 @@ import ( "strings" "time" - "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/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/integration/unified" - "go.mongodb.org/mongo-driver/internal/integtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/bsonutil" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integration/unified" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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/v2/mongo/readconcern" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" ) // Helper functions to execute and verify results from CRUD methods. diff --git a/internal/integration/crud_prose_test.go b/internal/integration/crud_prose_test.go index c069844374..8233763807 100644 --- a/internal/integration/crud_prose_test.go +++ b/internal/integration/crud_prose_test.go @@ -12,12 +12,12 @@ import ( "errors" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "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/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestWriteErrorsWithLabels(t *testing.T) { diff --git a/internal/integration/crud_spec_test.go b/internal/integration/crud_spec_test.go index a547904193..859de77d6a 100644 --- a/internal/integration/crud_spec_test.go +++ b/internal/integration/crud_spec_test.go @@ -16,11 +16,11 @@ import ( "strings" "testing" - "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/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" + "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/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" ) const ( diff --git a/internal/integration/csot_cse_prose_test.go b/internal/integration/csot_cse_prose_test.go index c4b6b17a55..3eb91369ad 100644 --- a/internal/integration/csot_cse_prose_test.go +++ b/internal/integration/csot_cse_prose_test.go @@ -13,13 +13,13 @@ import ( "context" "testing" - "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/integration/mtest" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // CSOT prose tests that require the 'cse' Go build tag. diff --git a/internal/integration/csot_prose_test.go b/internal/integration/csot_prose_test.go index edafc4ccb8..1997a6824c 100644 --- a/internal/integration/csot_prose_test.go +++ b/internal/integration/csot_prose_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "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/integration/mtest" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestCSOTProse(t *testing.T) { diff --git a/internal/integration/cursor_test.go b/internal/integration/cursor_test.go index 020de17285..6c77e7cc6a 100644 --- a/internal/integration/cursor_test.go +++ b/internal/integration/cursor_test.go @@ -13,11 +13,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) const ( diff --git a/internal/integration/data_lake_test.go b/internal/integration/data_lake_test.go index b66c967a89..6c10f9a9e6 100644 --- a/internal/integration/data_lake_test.go +++ b/internal/integration/data_lake_test.go @@ -11,12 +11,12 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestAtlasDataLake(t *testing.T) { diff --git a/internal/integration/database_test.go b/internal/integration/database_test.go index f9aaec2255..39c1b424c2 100644 --- a/internal/integration/database_test.go +++ b/internal/integration/database_test.go @@ -13,14 +13,14 @@ import ( "reflect" "testing" - "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/integration/mtest" - "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/x/bsonx/bsoncore" + "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/integration/mtest" + "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/x/bsonx/bsoncore" ) const ( diff --git a/internal/integration/errors_test.go b/internal/integration/errors_test.go index b3a4094c15..e81f8ec9e8 100644 --- a/internal/integration/errors_test.go +++ b/internal/integration/errors_test.go @@ -19,14 +19,14 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "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/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) type netErr struct { diff --git a/internal/integration/gridfs_test.go b/internal/integration/gridfs_test.go index f2062bbf33..76b4cdf318 100644 --- a/internal/integration/gridfs_test.go +++ b/internal/integration/gridfs_test.go @@ -15,13 +15,13 @@ import ( "testing" "time" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/israce" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/israce" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestGridFS(x *testing.T) { diff --git a/internal/integration/handshake_test.go b/internal/integration/handshake_test.go index 74b4aecbb7..a11339981d 100644 --- a/internal/integration/handshake_test.go +++ b/internal/integration/handshake_test.go @@ -13,14 +13,14 @@ import ( "runtime" "testing" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/version" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "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/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/version" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) func TestHandshakeProse(t *testing.T) { diff --git a/internal/integration/index_view_test.go b/internal/integration/index_view_test.go index a831aad631..9293e0c5b2 100644 --- a/internal/integration/index_view_test.go +++ b/internal/integration/index_view_test.go @@ -11,13 +11,13 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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/v2/x/bsonx/bsoncore" ) type index struct { diff --git a/internal/integration/initial_dns_seedlist_discovery_test.go b/internal/integration/initial_dns_seedlist_discovery_test.go index 1601883096..de9d44a058 100644 --- a/internal/integration/initial_dns_seedlist_discovery_test.go +++ b/internal/integration/initial_dns_seedlist_discovery_test.go @@ -17,16 +17,16 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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/x/mongo/driver/connstring" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) const ( diff --git a/internal/integration/json_helpers_test.go b/internal/integration/json_helpers_test.go index 941384e2e4..acdebce53d 100644 --- a/internal/integration/json_helpers_test.go +++ b/internal/integration/json_helpers_test.go @@ -18,13 +18,13 @@ import ( "testing" "time" - "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" + "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" ) var ( diff --git a/internal/integration/load_balancer_prose_test.go b/internal/integration/load_balancer_prose_test.go index c40c052993..274752d69b 100644 --- a/internal/integration/load_balancer_prose_test.go +++ b/internal/integration/load_balancer_prose_test.go @@ -13,12 +13,12 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestLoadBalancerSupport(t *testing.T) { diff --git a/internal/integration/log_helpers_test.go b/internal/integration/log_helpers_test.go index 80b78a6b2b..20f4f34e34 100644 --- a/internal/integration/log_helpers_test.go +++ b/internal/integration/log_helpers_test.go @@ -10,8 +10,8 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/logger" ) type testLogSink struct { diff --git a/internal/integration/main_test.go b/internal/integration/main_test.go index b1401f7d14..325318934f 100644 --- a/internal/integration/main_test.go +++ b/internal/integration/main_test.go @@ -12,7 +12,7 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" ) func TestMain(m *testing.M) { diff --git a/internal/integration/mock_find_test.go b/internal/integration/mock_find_test.go index f0b387343d..0775d7443f 100644 --- a/internal/integration/mock_find_test.go +++ b/internal/integration/mock_find_test.go @@ -10,11 +10,11 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // finder is an object that implements FindOne and Find. diff --git a/internal/integration/mongos_pinning_test.go b/internal/integration/mongos_pinning_test.go index cc3bce0397..7fc5af9349 100644 --- a/internal/integration/mongos_pinning_test.go +++ b/internal/integration/mongos_pinning_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestMongosPinning(t *testing.T) { diff --git a/internal/integration/mtest/deployment_helpers.go b/internal/integration/mtest/deployment_helpers.go index 299fae5672..86833032a5 100644 --- a/internal/integration/mtest/deployment_helpers.go +++ b/internal/integration/mtest/deployment_helpers.go @@ -7,7 +7,7 @@ package mtest import ( - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // BatchIdentifier specifies the keyword to identify the batch in a cursor response. diff --git a/internal/integration/mtest/global_state.go b/internal/integration/mtest/global_state.go index adb2622037..d9f7bf916e 100644 --- a/internal/integration/mtest/global_state.go +++ b/internal/integration/mtest/global_state.go @@ -10,10 +10,10 @@ import ( "context" "fmt" - "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" + "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" ) // AuthEnabled returns whether or not the cluster requires auth. diff --git a/internal/integration/mtest/mongotest.go b/internal/integration/mtest/mongotest.go index b179608c29..ed3d65a004 100644 --- a/internal/integration/mtest/mongotest.go +++ b/internal/integration/mtest/mongotest.go @@ -15,19 +15,19 @@ import ( "sync/atomic" "testing" - "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/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "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" + "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/internal/mongoutil" + "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/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" ) var ( diff --git a/internal/integration/mtest/opmsg_deployment.go b/internal/integration/mtest/opmsg_deployment.go index bcc10275e6..8b521b19f4 100644 --- a/internal/integration/mtest/opmsg_deployment.go +++ b/internal/integration/mtest/opmsg_deployment.go @@ -11,15 +11,15 @@ import ( "errors" "time" - "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/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "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/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) const ( diff --git a/internal/integration/mtest/options.go b/internal/integration/mtest/options.go index 626c8765f9..4635ec267c 100644 --- a/internal/integration/mtest/options.go +++ b/internal/integration/mtest/options.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // TopologyKind describes the topology that a test is run on. diff --git a/internal/integration/mtest/proxy_dialer.go b/internal/integration/mtest/proxy_dialer.go index c8e9e6d456..7f17dbbdb1 100644 --- a/internal/integration/mtest/proxy_dialer.go +++ b/internal/integration/mtest/proxy_dialer.go @@ -14,8 +14,8 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // ProxyMessage represents a sent/received pair of parsed wire messages. diff --git a/internal/integration/mtest/received_message.go b/internal/integration/mtest/received_message.go index 2e2f952242..91807a691d 100644 --- a/internal/integration/mtest/received_message.go +++ b/internal/integration/mtest/received_message.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) // ReceivedMessage represents a message received from the server. diff --git a/internal/integration/mtest/sent_message.go b/internal/integration/mtest/sent_message.go index db1ef33ffa..5be6cee7e0 100644 --- a/internal/integration/mtest/sent_message.go +++ b/internal/integration/mtest/sent_message.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) // SentMessage represents a message sent by the driver to the server. diff --git a/internal/integration/mtest/setup.go b/internal/integration/mtest/setup.go index ec1aafa1d2..5220d458e1 100644 --- a/internal/integration/mtest/setup.go +++ b/internal/integration/mtest/setup.go @@ -16,17 +16,17 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/integtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "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" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/connstring" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) const ( diff --git a/internal/integration/mtest/wiremessage_helpers.go b/internal/integration/mtest/wiremessage_helpers.go index c6d8a677f6..b6dfb4405e 100644 --- a/internal/integration/mtest/wiremessage_helpers.go +++ b/internal/integration/mtest/wiremessage_helpers.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) func copyBytes(original []byte) []byte { diff --git a/internal/integration/primary_stepdown_test.go b/internal/integration/primary_stepdown_test.go index 3611b6e58b..e308532b8e 100644 --- a/internal/integration/primary_stepdown_test.go +++ b/internal/integration/primary_stepdown_test.go @@ -10,12 +10,12 @@ import ( "context" "testing" - "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/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/eventtest" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) const ( diff --git a/internal/integration/retryable_reads_prose_test.go b/internal/integration/retryable_reads_prose_test.go index 575d7fbc05..d3f42758f9 100644 --- a/internal/integration/retryable_reads_prose_test.go +++ b/internal/integration/retryable_reads_prose_test.go @@ -12,14 +12,14 @@ import ( "testing" "time" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo/options" + "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/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestRetryableReadsProse(t *testing.T) { diff --git a/internal/integration/retryable_writes_prose_test.go b/internal/integration/retryable_writes_prose_test.go index 8151f2611f..2aefc553f4 100644 --- a/internal/integration/retryable_writes_prose_test.go +++ b/internal/integration/retryable_writes_prose_test.go @@ -14,16 +14,16 @@ import ( "testing" "time" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/mongo/driver" + "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/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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/v2/x/mongo/driver" ) func TestRetryableWritesProse(t *testing.T) { diff --git a/internal/integration/retryable_writes_spec_test.go b/internal/integration/retryable_writes_spec_test.go index 66f968e33d..324c508621 100644 --- a/internal/integration/retryable_writes_spec_test.go +++ b/internal/integration/retryable_writes_spec_test.go @@ -12,9 +12,9 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" ) const retryableWritesTestDir = "../../testdata/retryable-writes/legacy" diff --git a/internal/integration/sdam_error_handling_test.go b/internal/integration/sdam_error_handling_test.go index cdbd27f1b4..ee6485cff1 100644 --- a/internal/integration/sdam_error_handling_test.go +++ b/internal/integration/sdam_error_handling_test.go @@ -16,12 +16,12 @@ import ( "testing" "time" - "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/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/eventtest" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestSDAMErrorHandling(t *testing.T) { diff --git a/internal/integration/sdam_prose_test.go b/internal/integration/sdam_prose_test.go index 8d6a9fbb91..27dc47e641 100644 --- a/internal/integration/sdam_prose_test.go +++ b/internal/integration/sdam_prose_test.go @@ -14,17 +14,17 @@ import ( "testing" "time" - "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/handshake" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "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/handshake" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) func TestSDAMProse(t *testing.T) { diff --git a/internal/integration/search_index_prose_test.go b/internal/integration/search_index_prose_test.go index 3bb07e946b..a9fbfef4a4 100644 --- a/internal/integration/search_index_prose_test.go +++ b/internal/integration/search_index_prose_test.go @@ -14,16 +14,16 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/internal/uuid" - "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/writeconcern" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/uuid" + "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/writeconcern" ) func TestSearchIndexProse(t *testing.T) { diff --git a/internal/integration/server_selection_prose_test.go b/internal/integration/server_selection_prose_test.go index c790fa8c81..746d4bf477 100644 --- a/internal/integration/server_selection_prose_test.go +++ b/internal/integration/server_selection_prose_test.go @@ -12,15 +12,15 @@ import ( "testing" "time" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "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/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) type saturatedConnections map[int64]bool diff --git a/internal/integration/sessions_mongocryptd_prose_test.go b/internal/integration/sessions_mongocryptd_prose_test.go index 55fabc1061..5d088c26d5 100644 --- a/internal/integration/sessions_mongocryptd_prose_test.go +++ b/internal/integration/sessions_mongocryptd_prose_test.go @@ -15,14 +15,14 @@ import ( "strconv" "testing" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo" - "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/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "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/v2/x/bsonx/bsoncore" ) type mongocryptdProcess struct { diff --git a/internal/integration/sessions_test.go b/internal/integration/sessions_test.go index afc1e43fd7..02a345fd38 100644 --- a/internal/integration/sessions_test.go +++ b/internal/integration/sessions_test.go @@ -16,16 +16,16 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "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" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" "golang.org/x/sync/errgroup" ) diff --git a/internal/integration/unified/admin_helpers.go b/internal/integration/unified/admin_helpers.go index a5184432ab..f32d3b2d1a 100644 --- a/internal/integration/unified/admin_helpers.go +++ b/internal/integration/unified/admin_helpers.go @@ -11,11 +11,11 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) var ( diff --git a/internal/integration/unified/bsonutil.go b/internal/integration/unified/bsonutil.go index 17ce19549a..c904304aa0 100644 --- a/internal/integration/unified/bsonutil.go +++ b/internal/integration/unified/bsonutil.go @@ -9,8 +9,8 @@ package unified import ( "sort" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) var ( diff --git a/internal/integration/unified/bucket_options.go b/internal/integration/unified/bucket_options.go index 39827c0999..f556313f49 100644 --- a/internal/integration/unified/bucket_options.go +++ b/internal/integration/unified/bucket_options.go @@ -9,8 +9,8 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // gridFSBucketOptions is a wrapper for *options.BucketOptionsBuilder. This type diff --git a/internal/integration/unified/bulkwrite_helpers.go b/internal/integration/unified/bulkwrite_helpers.go index b985894837..85afc18833 100644 --- a/internal/integration/unified/bulkwrite_helpers.go +++ b/internal/integration/unified/bulkwrite_helpers.go @@ -9,10 +9,10 @@ package unified import ( "fmt" - "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" + "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" ) // This file provides helper functions to convert BSON documents to WriteModel diff --git a/internal/integration/unified/client_encryption_operation_execution.go b/internal/integration/unified/client_encryption_operation_execution.go index a045fe5cb8..ed2f76a6a8 100644 --- a/internal/integration/unified/client_encryption_operation_execution.go +++ b/internal/integration/unified/client_encryption_operation_execution.go @@ -11,10 +11,10 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // parseDataKeyOptions will parse an options document and return an options.DataKeyOptions instance. diff --git a/internal/integration/unified/client_entity.go b/internal/integration/unified/client_entity.go index e130293cfb..5c9dc88554 100644 --- a/internal/integration/unified/client_entity.go +++ b/internal/integration/unified/client_entity.go @@ -14,17 +14,17 @@ import ( "sync/atomic" "time" - "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/integration/mtest" - "go.mongodb.org/mongo-driver/internal/integtest" - "go.mongodb.org/mongo-driver/internal/logger" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "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/x/bsonx/bsoncore" + "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/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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/x/bsonx/bsoncore" ) // There are no automated tests for truncation. Given that, setting the diff --git a/internal/integration/unified/client_operation_execution.go b/internal/integration/unified/client_operation_execution.go index a48b042444..6758af9fc0 100644 --- a/internal/integration/unified/client_operation_execution.go +++ b/internal/integration/unified/client_operation_execution.go @@ -11,11 +11,11 @@ import ( "fmt" "time" - "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" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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/v2/x/bsonx/bsoncore" ) // This file contains helpers to execute client operations. diff --git a/internal/integration/unified/collection_data.go b/internal/integration/unified/collection_data.go index ac20b9fca6..02ceb3f147 100644 --- a/internal/integration/unified/collection_data.go +++ b/internal/integration/unified/collection_data.go @@ -11,12 +11,12 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/bsonutil" - "go.mongodb.org/mongo-driver/internal/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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/bsonutil" + "go.mongodb.org/mongo-driver/v2/internal/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" ) type collectionData struct { diff --git a/internal/integration/unified/collection_operation_execution.go b/internal/integration/unified/collection_operation_execution.go index d664be49c4..f772bcfb46 100644 --- a/internal/integration/unified/collection_operation_execution.go +++ b/internal/integration/unified/collection_operation_execution.go @@ -12,12 +12,12 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/bsonutil" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/mongo" - "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/internal/bsonutil" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // This file contains helpers to execute collection operations. diff --git a/internal/integration/unified/common_options.go b/internal/integration/unified/common_options.go index 2b78466a9b..b0f3e84b57 100644 --- a/internal/integration/unified/common_options.go +++ b/internal/integration/unified/common_options.go @@ -10,11 +10,11 @@ import ( "fmt" "time" - "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" + "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" ) // This file defines helper types to convert BSON documents to ReadConcern, WriteConcern, and ReadPref objects. diff --git a/internal/integration/unified/context.go b/internal/integration/unified/context.go index f4cbce506f..151f727fef 100644 --- a/internal/integration/unified/context.go +++ b/internal/integration/unified/context.go @@ -10,7 +10,7 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/v2/mongo" ) // ctxKey is used to define keys for values stored in context.Context objects. diff --git a/internal/integration/unified/crud_helpers.go b/internal/integration/unified/crud_helpers.go index 6ebb4b2b90..339cb4ce5a 100644 --- a/internal/integration/unified/crud_helpers.go +++ b/internal/integration/unified/crud_helpers.go @@ -9,9 +9,9 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/bsonutil" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/bsonutil" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // newMissingArgumentError creates an error to convey that an argument that is required to run an operation is missing diff --git a/internal/integration/unified/cursor_operation_execution.go b/internal/integration/unified/cursor_operation_execution.go index 1f9f5fca60..894bb87ce3 100644 --- a/internal/integration/unified/cursor_operation_execution.go +++ b/internal/integration/unified/cursor_operation_execution.go @@ -10,7 +10,7 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) func executeIterateOnce(ctx context.Context, operation *operation) (*operationResult, error) { diff --git a/internal/integration/unified/database_operation_execution.go b/internal/integration/unified/database_operation_execution.go index 6b95a41954..7fa42f3c78 100644 --- a/internal/integration/unified/database_operation_execution.go +++ b/internal/integration/unified/database_operation_execution.go @@ -11,9 +11,9 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/bsonutil" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/bsonutil" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // This file contains helpers to execute database operations. diff --git a/internal/integration/unified/db_collection_options.go b/internal/integration/unified/db_collection_options.go index 5fb96fdb73..96f5ac2320 100644 --- a/internal/integration/unified/db_collection_options.go +++ b/internal/integration/unified/db_collection_options.go @@ -9,8 +9,8 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) type dbOrCollectionOptions struct { diff --git a/internal/integration/unified/entity.go b/internal/integration/unified/entity.go index 0ef779587e..779570a8da 100644 --- a/internal/integration/unified/entity.go +++ b/internal/integration/unified/entity.go @@ -17,10 +17,10 @@ import ( "sync/atomic" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) var ( diff --git a/internal/integration/unified/entity_test.go b/internal/integration/unified/entity_test.go index 3974e58400..befa23edc2 100644 --- a/internal/integration/unified/entity_test.go +++ b/internal/integration/unified/entity_test.go @@ -10,8 +10,8 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestEntityMap(t *testing.T) { diff --git a/internal/integration/unified/error.go b/internal/integration/unified/error.go index 0edc79428a..c5d7a73f8a 100644 --- a/internal/integration/unified/error.go +++ b/internal/integration/unified/error.go @@ -12,8 +12,8 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" ) // expectedError represents an error that is expected to occur during a test. This type ignores the "isError" field in diff --git a/internal/integration/unified/event.go b/internal/integration/unified/event.go index d62b384ba5..20c181ea00 100644 --- a/internal/integration/unified/event.go +++ b/internal/integration/unified/event.go @@ -9,8 +9,8 @@ package unified import ( "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" ) type monitoringEventType string diff --git a/internal/integration/unified/event_verification.go b/internal/integration/unified/event_verification.go index d6f64723e3..b9a12a5fb2 100644 --- a/internal/integration/unified/event_verification.go +++ b/internal/integration/unified/event_verification.go @@ -12,8 +12,8 @@ import ( "errors" "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" ) type commandMonitoringEvent struct { diff --git a/internal/integration/unified/gridfs_bucket_operation_execution.go b/internal/integration/unified/gridfs_bucket_operation_execution.go index 512c582842..b0e4d35099 100644 --- a/internal/integration/unified/gridfs_bucket_operation_execution.go +++ b/internal/integration/unified/gridfs_bucket_operation_execution.go @@ -14,9 +14,9 @@ import ( "io" "math" - "go.mongodb.org/mongo-driver/bson" - "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/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func createBucketFindCursor(ctx context.Context, operation *operation) (*cursorResult, error) { diff --git a/internal/integration/unified/logger.go b/internal/integration/unified/logger.go index eb9379f9e3..c951cc2ac2 100644 --- a/internal/integration/unified/logger.go +++ b/internal/integration/unified/logger.go @@ -10,7 +10,7 @@ import ( "context" "sync" - "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/logger" ) // orderedLogMessage is a logMessage with an "order" field representing the diff --git a/internal/integration/unified/logger_verification.go b/internal/integration/unified/logger_verification.go index ec4b78abc0..2c6119d8af 100644 --- a/internal/integration/unified/logger_verification.go +++ b/internal/integration/unified/logger_verification.go @@ -11,8 +11,8 @@ import ( "fmt" "sync" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/logger" ) // errLoggerVerification is use to wrap errors associated with validating the diff --git a/internal/integration/unified/main_test.go b/internal/integration/unified/main_test.go index 074cdc4b71..dfacb3c786 100644 --- a/internal/integration/unified/main_test.go +++ b/internal/integration/unified/main_test.go @@ -12,7 +12,7 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" ) func TestMain(m *testing.M) { diff --git a/internal/integration/unified/matches.go b/internal/integration/unified/matches.go index bd8a0f916e..52afdc283c 100644 --- a/internal/integration/unified/matches.go +++ b/internal/integration/unified/matches.go @@ -13,7 +13,7 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // keyPathCtxKey is used as a key for a Context object. The value conveys the BSON key path that is currently being diff --git a/internal/integration/unified/matches_test.go b/internal/integration/unified/matches_test.go index a9be9c6a88..ddee78ec57 100644 --- a/internal/integration/unified/matches_test.go +++ b/internal/integration/unified/matches_test.go @@ -11,9 +11,9 @@ import ( "encoding/hex" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestMatches(t *testing.T) { diff --git a/internal/integration/unified/operation.go b/internal/integration/unified/operation.go index 989e58673c..75462693d0 100644 --- a/internal/integration/unified/operation.go +++ b/internal/integration/unified/operation.go @@ -11,9 +11,9 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/csot" - "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/csot" + "go.mongodb.org/mongo-driver/v2/mongo" ) type operation struct { diff --git a/internal/integration/unified/result.go b/internal/integration/unified/result.go index 7aea2ae2ca..37243d7120 100644 --- a/internal/integration/unified/result.go +++ b/internal/integration/unified/result.go @@ -10,7 +10,7 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // operationResult holds the result and/or error returned by an op. diff --git a/internal/integration/unified/schema_version.go b/internal/integration/unified/schema_version.go index eb1ed50889..1d2f99fb96 100644 --- a/internal/integration/unified/schema_version.go +++ b/internal/integration/unified/schema_version.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "go.mongodb.org/mongo-driver/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" ) var ( diff --git a/internal/integration/unified/server_api_options.go b/internal/integration/unified/server_api_options.go index f0175ec76c..72e24496de 100644 --- a/internal/integration/unified/server_api_options.go +++ b/internal/integration/unified/server_api_options.go @@ -9,8 +9,8 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // serverAPIOptions is a wrapper for *options.ServerAPIOptions. This type implements the bson.Unmarshaler interface diff --git a/internal/integration/unified/session_operation_execution.go b/internal/integration/unified/session_operation_execution.go index 5a97b6bbf6..55f2297ba8 100644 --- a/internal/integration/unified/session_operation_execution.go +++ b/internal/integration/unified/session_operation_execution.go @@ -10,8 +10,8 @@ import ( "context" "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func executeAbortTransaction(ctx context.Context, operation *operation) (*operationResult, error) { diff --git a/internal/integration/unified/session_options.go b/internal/integration/unified/session_options.go index 6575ca7157..447bdc8c38 100644 --- a/internal/integration/unified/session_options.go +++ b/internal/integration/unified/session_options.go @@ -9,9 +9,9 @@ package unified import ( "fmt" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // transactionOptions is a wrapper for *options.transactionOptions. This type implements the bson.Unmarshaler interface diff --git a/internal/integration/unified/testrunner_operation.go b/internal/integration/unified/testrunner_operation.go index dfa9a124d5..e6eff60816 100644 --- a/internal/integration/unified/testrunner_operation.go +++ b/internal/integration/unified/testrunner_operation.go @@ -12,11 +12,11 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // waitForEventTimeout is the amount of time to wait for an event to occur. The diff --git a/internal/integration/unified/unified_spec_runner.go b/internal/integration/unified/unified_spec_runner.go index 3348bb267a..8ec5d14454 100644 --- a/internal/integration/unified/unified_spec_runner.go +++ b/internal/integration/unified/unified_spec_runner.go @@ -15,11 +15,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/spectest" - "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/spectest" + "go.mongodb.org/mongo-driver/v2/mongo" ) var ( diff --git a/internal/integration/unified_runner_events_helper_test.go b/internal/integration/unified_runner_events_helper_test.go index 2fc9c22cbe..a51e4c9442 100644 --- a/internal/integration/unified_runner_events_helper_test.go +++ b/internal/integration/unified_runner_events_helper_test.go @@ -11,14 +11,14 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/serverselector" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/mongo/readpref" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/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/internal/integration/unified_runner_thread_helpers_test.go b/internal/integration/unified_runner_thread_helpers_test.go index 023a1b5b7b..d4d81ff23d 100644 --- a/internal/integration/unified_runner_thread_helpers_test.go +++ b/internal/integration/unified_runner_thread_helpers_test.go @@ -10,9 +10,9 @@ import ( "fmt" "sync" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" ) // Helper functions for the operations in the unified spec test runner that require creating and synchronizing diff --git a/internal/integration/unified_spec_test.go b/internal/integration/unified_spec_test.go index afe2fc4dc1..fcee24a989 100644 --- a/internal/integration/unified_spec_test.go +++ b/internal/integration/unified_spec_test.go @@ -20,21 +20,21 @@ import ( "time" "unsafe" - "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/bsonutil" - "go.mongodb.org/mongo-driver/internal/integration/mtest" - "go.mongodb.org/mongo-driver/internal/integtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/address" - "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" + "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/bsonutil" + "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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" ) const ( diff --git a/internal/integtest/integtest.go b/internal/integtest/integtest.go index f706c2b374..40f99d2932 100644 --- a/internal/integtest/integtest.go +++ b/internal/integtest/integtest.go @@ -18,15 +18,15 @@ import ( "sync" "testing" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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" ) var connectionString *connstring.ConnString diff --git a/internal/logger/component.go b/internal/logger/component.go index b21209b3a4..a601707cbf 100644 --- a/internal/logger/component.go +++ b/internal/logger/component.go @@ -10,7 +10,7 @@ import ( "os" "strconv" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) const ( diff --git a/internal/logger/component_test.go b/internal/logger/component_test.go index 004f84e7fd..5177b021af 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/bson" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/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 9fee41552d..b8238ea9cb 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/internal/assert" - "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/logger" ) func TestContext_WithOperationName(t *testing.T) { diff --git a/internal/logger/logger_test.go b/internal/logger/logger_test.go index 8629a10748..b71ac06204 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/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) type mockLogSink struct{} diff --git a/internal/mongoutil/mongoutil.go b/internal/mongoutil/mongoutil.go index 0775bc9dbd..f42dfd3da4 100644 --- a/internal/mongoutil/mongoutil.go +++ b/internal/mongoutil/mongoutil.go @@ -9,7 +9,7 @@ package mongoutil import ( "reflect" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) // NewOptions will functionally merge a slice of mongo.Options in a diff --git a/internal/mongoutil/mongoutil_test.go b/internal/mongoutil/mongoutil_test.go index 1665643d4c..522d47ce3e 100644 --- a/internal/mongoutil/mongoutil_test.go +++ b/internal/mongoutil/mongoutil_test.go @@ -11,9 +11,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/ptrutil" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/ptrutil" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestNewOptions(t *testing.T) { diff --git a/internal/ptrutil/int64_test.go b/internal/ptrutil/int64_test.go index 6a267484d8..b7b8605101 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/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestCompareInt64(t *testing.T) { diff --git a/internal/rand/example_test.go b/internal/rand/example_test.go index 1bf04da8bb..81fab024dd 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/internal/rand" + "go.mongodb.org/mongo-driver/v2/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 023c02962c..c9413a2a1e 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/internal/rand" + . "go.mongodb.org/mongo-driver/v2/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 dd8c6d6f41..a11bf5ea6d 100644 --- a/internal/randutil/randutil.go +++ b/internal/randutil/randutil.go @@ -12,7 +12,7 @@ import ( "fmt" "io" - xrand "go.mongodb.org/mongo-driver/internal/rand" + xrand "go.mongodb.org/mongo-driver/v2/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 ca49ac6dde..08eff7e990 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/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/require" ) func TestCryptoSeed(t *testing.T) { diff --git a/internal/require/require.go b/internal/require/require.go index 4854bbcd54..26d1885759 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/internal/assert" + assert "go.mongodb.org/mongo-driver/v2/internal/assert" ) // TestingT is an interface wrapper around *testing.T diff --git a/internal/serverselector/server_selector.go b/internal/serverselector/server_selector.go index 4599b0f9d3..86b33733ba 100644 --- a/internal/serverselector/server_selector.go +++ b/internal/serverselector/server_selector.go @@ -11,9 +11,9 @@ import ( "math" "time" - "go.mongodb.org/mongo-driver/mongo/readpref" - "go.mongodb.org/mongo-driver/tag" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/tag" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) // Composite combines multiple selectors into a single selector by applying them diff --git a/internal/serverselector/server_selector_test.go b/internal/serverselector/server_selector_test.go index a8f212aeca..bc330e27c7 100644 --- a/internal/serverselector/server_selector_test.go +++ b/internal/serverselector/server_selector_test.go @@ -14,15 +14,15 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/internal/spectest" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/mongo/readpref" - "go.mongodb.org/mongo-driver/tag" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/spectest" + "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/v2/x/mongo/driver/description" ) type lastWriteDate struct { diff --git a/internal/spectest/spectest.go b/internal/spectest/spectest.go index 276fc35572..363b072c2c 100644 --- a/internal/spectest/spectest.go +++ b/internal/spectest/spectest.go @@ -11,7 +11,7 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/require" ) // FindJSONFilesInDir finds the JSON files in a directory. diff --git a/internal/uuid/uuid.go b/internal/uuid/uuid.go index 86c2a33a73..be233bb96a 100644 --- a/internal/uuid/uuid.go +++ b/internal/uuid/uuid.go @@ -10,7 +10,7 @@ import ( "encoding/hex" "io" - "go.mongodb.org/mongo-driver/internal/randutil" + "go.mongodb.org/mongo-driver/v2/internal/randutil" ) // UUID represents a UUID. diff --git a/internal/uuid/uuid_test.go b/internal/uuid/uuid_test.go index 0426d07cdd..76ea4d35ce 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/internal/israce" - "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/israce" + "go.mongodb.org/mongo-driver/v2/internal/require" ) // GODRIVER-2349 diff --git a/mongo/address/addr_test.go b/mongo/address/addr_test.go index 0e2f474ce1..bb07d1097d 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/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/require" ) func TestAddress_String(t *testing.T) { diff --git a/mongo/background_context_test.go b/mongo/background_context_test.go index fe679ed1e8..691411c8fa 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/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestBackgroundContext(t *testing.T) { diff --git a/mongo/batch_cursor.go b/mongo/batch_cursor.go index a50fa899cf..148a627530 100644 --- a/mongo/batch_cursor.go +++ b/mongo/batch_cursor.go @@ -10,8 +10,8 @@ import ( "context" "time" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/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 191f32ed8b..b151d9da77 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/bson" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/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 cf8127ccc9..cc19e5d670 100644 --- a/mongo/bulk_write.go +++ b/mongo/bulk_write.go @@ -10,14 +10,14 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/bson" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) type bulkWriteBatch struct { diff --git a/mongo/bulk_write_models.go b/mongo/bulk_write_models.go index 64f4589189..0e0cadf082 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/mongo/options" + "go.mongodb.org/mongo-driver/v2/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 bea2924614..df914f4ca4 100644 --- a/mongo/change_stream.go +++ b/mongo/change_stream.go @@ -14,20 +14,20 @@ import ( "strconv" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/csot" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/csot" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) var ( diff --git a/mongo/change_stream_deployment.go b/mongo/change_stream_deployment.go index b4fdbd2690..509d47a86d 100644 --- a/mongo/change_stream_deployment.go +++ b/mongo/change_stream_deployment.go @@ -10,9 +10,9 @@ import ( "context" "time" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) type changeStreamDeployment struct { diff --git a/mongo/change_stream_test.go b/mongo/change_stream_test.go index 6ec3e0e2bd..8e722764a8 100644 --- a/mongo/change_stream_test.go +++ b/mongo/change_stream_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestChangeStream(t *testing.T) { diff --git a/mongo/client.go b/mongo/client.go index 9dc55f17c2..bf7ee66f4a 100644 --- a/mongo/client.go +++ b/mongo/client.go @@ -13,26 +13,26 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/bson" - "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/mongoutil" - "go.mongodb.org/mongo-driver/internal/ptrutil" - "go.mongodb.org/mongo-driver/internal/serverselector" - "go.mongodb.org/mongo-driver/internal/uuid" - "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/description" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "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/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/ptrutil" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "go.mongodb.org/mongo-driver/v2/internal/uuid" + "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/description" + "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" ) const ( diff --git a/mongo/client_encryption.go b/mongo/client_encryption.go index 726ec5d9b8..6416e0d413 100644 --- a/mongo/client_encryption.go +++ b/mongo/client_encryption.go @@ -12,13 +12,13 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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" ) // 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 fae3083580..c939a77ceb 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/bson" - "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/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" ) func ExampleClient() { diff --git a/mongo/client_side_encryption_examples_test.go b/mongo/client_side_encryption_examples_test.go index 41b62cf3c5..7e88d42925 100644 --- a/mongo/client_side_encryption_examples_test.go +++ b/mongo/client_side_encryption_examples_test.go @@ -13,8 +13,8 @@ import ( "fmt" "log" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func Example_clientSideEncryption() { diff --git a/mongo/client_test.go b/mongo/client_test.go index 79b6df8455..72e3ee0962 100644 --- a/mongo/client_test.go +++ b/mongo/client_test.go @@ -14,19 +14,19 @@ import ( "testing" "time" - "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/internal/mongoutil" - "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/mongocrypt" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "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/internal/mongoutil" + "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/mongocrypt" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) var bgCtx = context.Background() diff --git a/mongo/collection.go b/mongo/collection.go index 2de83ec1b0..b346c5d9ae 100644 --- a/mongo/collection.go +++ b/mongo/collection.go @@ -14,19 +14,19 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/csfle" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/csfle" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/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 3362a014a9..38f0c4766a 100644 --- a/mongo/collection_test.go +++ b/mongo/collection_test.go @@ -10,13 +10,13 @@ import ( "errors" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/ptrutil" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/ptrutil" + "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" ) const ( diff --git a/mongo/crud_examples_test.go b/mongo/crud_examples_test.go index 008dd7ed71..27b2f9bafe 100644 --- a/mongo/crud_examples_test.go +++ b/mongo/crud_examples_test.go @@ -14,11 +14,11 @@ import ( "sync" "time" - "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/readconcern" - "go.mongodb.org/mongo-driver/mongo/readpref" + "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/readconcern" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" ) // Client examples diff --git a/mongo/crypt_retrievers.go b/mongo/crypt_retrievers.go index 5e96da731a..2354328d1c 100644 --- a/mongo/crypt_retrievers.go +++ b/mongo/crypt_retrievers.go @@ -9,7 +9,7 @@ package mongo import ( "context" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // keyRetriever gets keys from the key vault collection. diff --git a/mongo/cursor.go b/mongo/cursor.go index 22be70a17c..14888242d5 100644 --- a/mongo/cursor.go +++ b/mongo/cursor.go @@ -15,11 +15,11 @@ import ( "reflect" "time" - "go.mongodb.org/mongo-driver/bson" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "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" ) // 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 45a3247b15..0d49d4b585 100644 --- a/mongo/cursor_test.go +++ b/mongo/cursor_test.go @@ -12,12 +12,12 @@ import ( "testing" "time" - "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" + "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" ) type testBatchCursor struct { diff --git a/mongo/database.go b/mongo/database.go index 19824e377b..e33046a9c3 100644 --- a/mongo/database.go +++ b/mongo/database.go @@ -12,20 +12,20 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/csfle" - "go.mongodb.org/mongo-driver/internal/csot" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/csfle" + "go.mongodb.org/mongo-driver/v2/internal/csot" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) var ( diff --git a/mongo/database_test.go b/mongo/database_test.go index 82ea45d601..6b9b8df319 100644 --- a/mongo/database_test.go +++ b/mongo/database_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "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" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "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/v2/x/mongo/driver/topology" ) func setupDb(name string, opts ...options.Lister[options.DatabaseOptions]) *Database { diff --git a/mongo/errors.go b/mongo/errors.go index 91bb5c856a..240dab853d 100644 --- a/mongo/errors.go +++ b/mongo/errors.go @@ -14,11 +14,11 @@ import ( "net" "strings" - "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" + "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" ) // ErrUnacknowledgedWrite is returned by operations that have an unacknowledged write concern. diff --git a/mongo/errors_test.go b/mongo/errors_test.go index fd89c65f5f..eabcab8afb 100644 --- a/mongo/errors_test.go +++ b/mongo/errors_test.go @@ -9,9 +9,9 @@ package mongo import ( "testing" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/require" ) func TestErrorMessages(t *testing.T) { diff --git a/mongo/gridfs_bucket.go b/mongo/gridfs_bucket.go index 1c3bca46ac..35fea91388 100644 --- a/mongo/gridfs_bucket.go +++ b/mongo/gridfs_bucket.go @@ -13,14 +13,14 @@ import ( "fmt" "io" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/csot" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "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/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/csot" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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" ) // TODO: add sessions options diff --git a/mongo/gridfs_bucket_test.go b/mongo/gridfs_bucket_test.go index bb2451161a..7b01fff1c8 100644 --- a/mongo/gridfs_bucket_test.go +++ b/mongo/gridfs_bucket_test.go @@ -10,10 +10,10 @@ import ( "context" "testing" - "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/options" + "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/options" ) func TestBucket_openDownloadStream(t *testing.T) { diff --git a/mongo/gridfs_download_stream.go b/mongo/gridfs_download_stream.go index f454854a2f..f33515fe57 100644 --- a/mongo/gridfs_download_stream.go +++ b/mongo/gridfs_download_stream.go @@ -13,7 +13,7 @@ import ( "math" "time" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // ErrMissingChunk indicates that the number of chunks read from the server is diff --git a/mongo/gridfs_examples_test.go b/mongo/gridfs_examples_test.go index 22b1eaf819..fde726031b 100644 --- a/mongo/gridfs_examples_test.go +++ b/mongo/gridfs_examples_test.go @@ -14,9 +14,9 @@ import ( "log" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func ExampleGridFSBucket_OpenUploadStream() { diff --git a/mongo/gridfs_test.go b/mongo/gridfs_test.go index fe049d6806..17e080fa72 100644 --- a/mongo/gridfs_test.go +++ b/mongo/gridfs_test.go @@ -10,14 +10,14 @@ import ( "context" "testing" - "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/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "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/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" ) var ( diff --git a/mongo/gridfs_upload_stream.go b/mongo/gridfs_upload_stream.go index 9331e31e9e..4d0cc5d304 100644 --- a/mongo/gridfs_upload_stream.go +++ b/mongo/gridfs_upload_stream.go @@ -14,7 +14,7 @@ import ( "math" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // 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_view.go b/mongo/index_view.go index eef2e011c9..7a7b9811b3 100644 --- a/mongo/index_view.go +++ b/mongo/index_view.go @@ -13,15 +13,15 @@ import ( "fmt" "strconv" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/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/mongo.go b/mongo/mongo.go index 970b27e7f6..5b43b67604 100644 --- a/mongo/mongo.go +++ b/mongo/mongo.go @@ -17,11 +17,11 @@ import ( "strconv" "strings" - "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/internal/codecutil" + "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/v2/bson" ) // Dialer is used to make network connections. diff --git a/mongo/mongo_test.go b/mongo/mongo_test.go index 736594a6e6..08388933f2 100644 --- a/mongo/mongo_test.go +++ b/mongo/mongo_test.go @@ -11,12 +11,12 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/bson" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "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" ) func TestEnsureID(t *testing.T) { diff --git a/mongo/mongocryptd.go b/mongo/mongocryptd.go index 9a61f2aef5..cedc48381c 100644 --- a/mongo/mongocryptd.go +++ b/mongo/mongocryptd.go @@ -13,11 +13,11 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "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/v2/internal/mongoutil" + "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" ) const ( diff --git a/mongo/ocsp_test.go b/mongo/ocsp_test.go index 97dbe0d62d..b180caa2a5 100644 --- a/mongo/ocsp_test.go +++ b/mongo/ocsp_test.go @@ -14,11 +14,11 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/integtest" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" ) func TestOCSP(t *testing.T) { diff --git a/mongo/options/aggregateoptions.go b/mongo/options/aggregateoptions.go index 0700b72d7f..5fdbd65952 100644 --- a/mongo/options/aggregateoptions.go +++ b/mongo/options/aggregateoptions.go @@ -9,7 +9,7 @@ package options import ( "time" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // AggregateOptions represents arguments that can be used to configure an diff --git a/mongo/options/changestreamoptions.go b/mongo/options/changestreamoptions.go index 435b374726..2d023774bd 100644 --- a/mongo/options/changestreamoptions.go +++ b/mongo/options/changestreamoptions.go @@ -9,7 +9,7 @@ package options import ( "time" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // ChangeStreamOptions represents arguments that can be used to configure a Watch operation. diff --git a/mongo/options/clientencryptionoptions.go b/mongo/options/clientencryptionoptions.go index d3807fe73b..43f27780e8 100644 --- a/mongo/options/clientencryptionoptions.go +++ b/mongo/options/clientencryptionoptions.go @@ -11,7 +11,7 @@ import ( "fmt" "net/http" - "go.mongodb.org/mongo-driver/internal/httputil" + "go.mongodb.org/mongo-driver/v2/internal/httputil" ) // ClientEncryptionOptions represents all possible arguments used to configure a ClientEncryption instance. diff --git a/mongo/options/clientoptions.go b/mongo/options/clientoptions.go index 2f0ed5d036..ba64b29731 100644 --- a/mongo/options/clientoptions.go +++ b/mongo/options/clientoptions.go @@ -22,16 +22,16 @@ import ( "time" "github.com/youmark/pkcs8" - "go.mongodb.org/mongo-driver/bson" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "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" ) const ( diff --git a/mongo/options/clientoptions_test.go b/mongo/options/clientoptions_test.go index 090d753a69..c50a4dfb32 100644 --- a/mongo/options/clientoptions_test.go +++ b/mongo/options/clientoptions_test.go @@ -23,14 +23,14 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "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/ptrutil" - "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" + "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/ptrutil" + "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" ) var tClientOptions = reflect.TypeOf(&ClientOptionsBuilder{}) diff --git a/mongo/options/collation_test.go b/mongo/options/collation_test.go index 084c4a9910..9ec61ca66a 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/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestCollation(t *testing.T) { diff --git a/mongo/options/collectionoptions.go b/mongo/options/collectionoptions.go index 5aa75b653a..66228d791c 100644 --- a/mongo/options/collectionoptions.go +++ b/mongo/options/collectionoptions.go @@ -7,10 +7,10 @@ package options import ( - "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/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" ) // CollectionOptions represents arguments that can be used to configure a diff --git a/mongo/options/dboptions.go b/mongo/options/dboptions.go index c12252436f..617bfb8525 100644 --- a/mongo/options/dboptions.go +++ b/mongo/options/dboptions.go @@ -7,10 +7,10 @@ package options import ( - "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/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" ) // DatabaseOptions represents arguments that can be used to configure a diff --git a/mongo/options/encryptoptions.go b/mongo/options/encryptoptions.go index d05d58a322..6c0adc349e 100644 --- a/mongo/options/encryptoptions.go +++ b/mongo/options/encryptoptions.go @@ -7,7 +7,7 @@ package options import ( - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // These constants specify valid values for QueryType diff --git a/mongo/options/example_test.go b/mongo/options/example_test.go index b3c13341b7..0c4ff3c214 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/mongo" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) type CustomLogger struct { diff --git a/mongo/options/gridfsoptions.go b/mongo/options/gridfsoptions.go index ff18fbc9b3..0d4f111440 100644 --- a/mongo/options/gridfsoptions.go +++ b/mongo/options/gridfsoptions.go @@ -7,10 +7,10 @@ package options import ( - "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/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" ) // DefaultName is the default name for a GridFS bucket. diff --git a/mongo/options/loggeroptions.go b/mongo/options/loggeroptions.go index a10ecdc1bc..9840803cbe 100644 --- a/mongo/options/loggeroptions.go +++ b/mongo/options/loggeroptions.go @@ -7,7 +7,7 @@ package options import ( - "go.mongodb.org/mongo-driver/internal/logger" + "go.mongodb.org/mongo-driver/v2/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 756684af7b..8a3e1d7ca5 100644 --- a/mongo/options/mongooptions.go +++ b/mongo/options/mongooptions.go @@ -10,8 +10,8 @@ import ( "bytes" "strconv" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/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 337186e617..964b7173e1 100644 --- a/mongo/options/runcmdoptions.go +++ b/mongo/options/runcmdoptions.go @@ -7,7 +7,7 @@ package options import ( - "go.mongodb.org/mongo-driver/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" ) // RunCmdOptions represents arguments that can be used to configure a RunCommand diff --git a/mongo/options/transactionoptions.go b/mongo/options/transactionoptions.go index 6077b98f00..0b6e6f7408 100644 --- a/mongo/options/transactionoptions.go +++ b/mongo/options/transactionoptions.go @@ -7,9 +7,9 @@ package options import ( - "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/v2/mongo/readconcern" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" ) // TransactionOptions represents arguments that can be used to configure a diff --git a/mongo/read_write_concern_spec_test.go b/mongo/read_write_concern_spec_test.go index 0dbe04fbdc..0445eae9f8 100644 --- a/mongo/read_write_concern_spec_test.go +++ b/mongo/read_write_concern_spec_test.go @@ -14,12 +14,12 @@ import ( "reflect" "testing" - "go.mongodb.org/mongo-driver/bson" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "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" ) const ( diff --git a/mongo/readconcern/readconcern.go b/mongo/readconcern/readconcern.go index b2ef19c96a..655cd07d81 100644 --- a/mongo/readconcern/readconcern.go +++ b/mongo/readconcern/readconcern.go @@ -13,8 +13,8 @@ package readconcern import ( "errors" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/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 cecd0e90fe..ce9a533b40 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/internal/assert" - "go.mongodb.org/mongo-driver/mongo/readconcern" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func TestReadConcern_MarshalBSONValue(t *testing.T) { diff --git a/mongo/readpref/mode_test.go b/mongo/readpref/mode_test.go index 572043f0ae..e92d4a35fb 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/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestMode_String(t *testing.T) { diff --git a/mongo/readpref/options.go b/mongo/readpref/options.go index c59b0705f1..f4671d5d36 100644 --- a/mongo/readpref/options.go +++ b/mongo/readpref/options.go @@ -10,7 +10,7 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/v2/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 bdff555d34..ff66de621f 100644 --- a/mongo/readpref/options_example_test.go +++ b/mongo/readpref/options_example_test.go @@ -7,10 +7,10 @@ package readpref_test import ( - "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" + "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" ) // 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 40c6ca76da..47e5b0cb8a 100644 --- a/mongo/readpref/readpref.go +++ b/mongo/readpref/readpref.go @@ -13,7 +13,7 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/v2/tag" ) var ( diff --git a/mongo/readpref/readpref_test.go b/mongo/readpref/readpref_test.go index d1ccb4554d..e0c7bf7d4b 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/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/tag" ) func TestPrimary(t *testing.T) { diff --git a/mongo/results.go b/mongo/results.go index 8b78954b67..887c0d646e 100644 --- a/mongo/results.go +++ b/mongo/results.go @@ -7,10 +7,10 @@ package mongo import ( - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/bson" + "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/operation" ) // BulkWriteResult is the result type returned by a BulkWrite operation. diff --git a/mongo/search_index_view.go b/mongo/search_index_view.go index dcabf612b3..ce00cce7dc 100644 --- a/mongo/search_index_view.go +++ b/mongo/search_index_view.go @@ -11,13 +11,13 @@ import ( "fmt" "strconv" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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" ) // SearchIndexView is a type that can be used to create, drop, list and update search indexes on a collection. A SearchIndexView for diff --git a/mongo/session.go b/mongo/session.go index e26856107a..95f21038a5 100644 --- a/mongo/session.go +++ b/mongo/session.go @@ -12,14 +12,14 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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" ) // 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 8998596992..1d716c2a4a 100644 --- a/mongo/single_result.go +++ b/mongo/single_result.go @@ -10,8 +10,8 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/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 a9f409eeb0..6a82837776 100644 --- a/mongo/single_result_test.go +++ b/mongo/single_result_test.go @@ -12,8 +12,8 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestNewSingleResultFromDocument(t *testing.T) { diff --git a/mongo/with_transactions_test.go b/mongo/with_transactions_test.go index da64870ddb..9878ebb92d 100644 --- a/mongo/with_transactions_test.go +++ b/mongo/with_transactions_test.go @@ -17,16 +17,16 @@ import ( "testing" "time" - "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/readpref" - "go.mongodb.org/mongo-driver/mongo/writeconcern" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "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/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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) var ( diff --git a/mongo/writeconcern/writeconcern.go b/mongo/writeconcern/writeconcern.go index c8398c7f15..ac6bf3d4b9 100644 --- a/mongo/writeconcern/writeconcern.go +++ b/mongo/writeconcern/writeconcern.go @@ -15,8 +15,8 @@ import ( "fmt" "math" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // WCMajority can be used to create a WriteConcern with a W value of "majority". diff --git a/mongo/writeconcern/writeconcern_example_test.go b/mongo/writeconcern/writeconcern_example_test.go index 36208805f0..e67afb1d45 100644 --- a/mongo/writeconcern/writeconcern_example_test.go +++ b/mongo/writeconcern/writeconcern_example_test.go @@ -7,9 +7,9 @@ package writeconcern_test import ( - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/v2/mongo" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/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 07f7b9c3ae..7ad8f44230 100644 --- a/mongo/writeconcern/writeconcern_test.go +++ b/mongo/writeconcern/writeconcern_test.go @@ -9,8 +9,8 @@ package writeconcern_test import ( "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/writeconcern" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" ) func TestWriteConcern(t *testing.T) { diff --git a/tag/tag_test.go b/tag/tag_test.go index 45f29ad866..cdd6ca6efe 100644 --- a/tag/tag_test.go +++ b/tag/tag_test.go @@ -9,8 +9,8 @@ package tag import ( "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/require" ) func TestTag_String(t *testing.T) { diff --git a/x/bsonx/bsoncore/bsoncore_test.go b/x/bsonx/bsoncore/bsoncore_test.go index 5e02ff0338..0937369dd9 100644 --- a/x/bsonx/bsoncore/bsoncore_test.go +++ b/x/bsonx/bsoncore/bsoncore_test.go @@ -15,7 +15,7 @@ import ( "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func compareErrors(err1, err2 error) bool { diff --git a/x/bsonx/bsoncore/iterator_test.go b/x/bsonx/bsoncore/iterator_test.go index e58812e9d0..ca733d32d9 100644 --- a/x/bsonx/bsoncore/iterator_test.go +++ b/x/bsonx/bsoncore/iterator_test.go @@ -10,8 +10,8 @@ import ( "io" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/require" ) func TestIterator_Reset(t *testing.T) { diff --git a/x/bsonx/bsoncore/value.go b/x/bsonx/bsoncore/value.go index 0d542deadb..d8ac10c594 100644 --- a/x/bsonx/bsoncore/value.go +++ b/x/bsonx/bsoncore/value.go @@ -18,7 +18,7 @@ import ( "time" "unicode/utf8" - "go.mongodb.org/mongo-driver/internal/decimal128" + "go.mongodb.org/mongo-driver/v2/internal/decimal128" ) // ElementTypeError specifies that a method to obtain a BSON value an incorrect type was called on a bson.Value. diff --git a/x/mongo/driver/auth/auth.go b/x/mongo/driver/auth/auth.go index e27465dac3..9694654b9e 100644 --- a/x/mongo/driver/auth/auth.go +++ b/x/mongo/driver/auth/auth.go @@ -12,12 +12,12 @@ import ( "fmt" "net/http" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/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 bb51d75685..911c583e39 100644 --- a/x/mongo/driver/auth/auth_spec_test.go +++ b/x/mongo/driver/auth/auth_spec_test.go @@ -13,10 +13,10 @@ import ( "path" "testing" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/internal/spectest" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/spectest" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) type credential struct { diff --git a/x/mongo/driver/auth/auth_test.go b/x/mongo/driver/auth/auth_test.go index 9145a21595..082401ed20 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/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" + "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" ) func TestCreateAuthenticator(t *testing.T) { diff --git a/x/mongo/driver/auth/aws_conv.go b/x/mongo/driver/auth/aws_conv.go index 51fc310a91..f6bb370c4d 100644 --- a/x/mongo/driver/auth/aws_conv.go +++ b/x/mongo/driver/auth/aws_conv.go @@ -17,10 +17,10 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/bson" - "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" + "go.mongodb.org/mongo-driver/v2/bson" + "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" ) type clientState int diff --git a/x/mongo/driver/auth/conversation.go b/x/mongo/driver/auth/conversation.go index fe8f472c96..7159f4e2be 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/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/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 06bba45343..36595c2090 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/internal/aws/credentials" - "go.mongodb.org/mongo-driver/internal/credproviders" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) const ( diff --git a/x/mongo/driver/auth/creds/azurecreds.go b/x/mongo/driver/auth/creds/azurecreds.go index d8f105a9d9..c6d4b473af 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/internal/aws/credentials" - "go.mongodb.org/mongo-driver/internal/credproviders" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) // 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 3cca7de92d..ad464fe7ed 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/internal/assert" - "go.mongodb.org/mongo-driver/internal/aws/credentials" - "go.mongodb.org/mongo-driver/internal/credproviders" + "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" ) type pipeTransport struct { diff --git a/x/mongo/driver/auth/creds/gcpcreds.go b/x/mongo/driver/auth/creds/gcpcreds.go index 74f352e36e..f265bf857d 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/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // GCPCredentialProvider provides GCP credentials. diff --git a/x/mongo/driver/auth/gssapi.go b/x/mongo/driver/auth/gssapi.go index 9181280887..2b68417efa 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/x/mongo/driver/auth/internal/gssapi" + "go.mongodb.org/mongo-driver/v2/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 8df412c54f..968b3ac732 100644 --- a/x/mongo/driver/auth/gssapi_test.go +++ b/x/mongo/driver/auth/gssapi_test.go @@ -13,10 +13,10 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) func TestGSSAPIAuthenticator(t *testing.T) { diff --git a/x/mongo/driver/auth/mongodbaws.go b/x/mongo/driver/auth/mongodbaws.go index 7ae4b08998..14fd637d97 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/internal/aws/credentials" - "go.mongodb.org/mongo-driver/internal/credproviders" - "go.mongodb.org/mongo-driver/x/mongo/driver/auth/creds" + "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" ) // 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 e066b0270d..ef72d7f29f 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/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestGetRegion(t *testing.T) { diff --git a/x/mongo/driver/auth/mongodbcr.go b/x/mongo/driver/auth/mongodbcr.go index dcbdea82cf..643d3a4c2c 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/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" + "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" ) // 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 3d77cc44ff..70f4e6868c 100644 --- a/x/mongo/driver/auth/mongodbcr_test.go +++ b/x/mongo/driver/auth/mongodbcr_test.go @@ -12,11 +12,11 @@ import ( "strings" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) 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 251c3475f9..5ee64748ed 100644 --- a/x/mongo/driver/auth/plain_test.go +++ b/x/mongo/driver/auth/plain_test.go @@ -13,12 +13,12 @@ import ( "encoding/base64" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) func TestPlainAuthenticator_Fails(t *testing.T) { diff --git a/x/mongo/driver/auth/sasl.go b/x/mongo/driver/auth/sasl.go index 2a84b53a64..124aae137c 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/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" + "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" ) // 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 c1238cd6a9..963dd5f338 100644 --- a/x/mongo/driver/auth/scram.go +++ b/x/mongo/driver/auth/scram.go @@ -17,7 +17,7 @@ import ( "github.com/xdg-go/scram" "github.com/xdg-go/stringprep" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) const ( diff --git a/x/mongo/driver/auth/scram_test.go b/x/mongo/driver/auth/scram_test.go index 851bd6fb94..9b793bc31b 100644 --- a/x/mongo/driver/auth/scram_test.go +++ b/x/mongo/driver/auth/scram_test.go @@ -10,11 +10,11 @@ import ( "context" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) const ( diff --git a/x/mongo/driver/auth/speculative_scram_test.go b/x/mongo/driver/auth/speculative_scram_test.go index 6ea2b8afcd..1e6083c464 100644 --- a/x/mongo/driver/auth/speculative_scram_test.go +++ b/x/mongo/driver/auth/speculative_scram_test.go @@ -11,13 +11,13 @@ import ( "context" "testing" - "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" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "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/v2/x/mongo/driver/mnet" ) var ( diff --git a/x/mongo/driver/auth/speculative_x509_test.go b/x/mongo/driver/auth/speculative_x509_test.go index 4c74f921fc..ac50aa641b 100644 --- a/x/mongo/driver/auth/speculative_x509_test.go +++ b/x/mongo/driver/auth/speculative_x509_test.go @@ -11,13 +11,13 @@ import ( "context" "testing" - "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" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "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/v2/x/mongo/driver/mnet" ) var ( diff --git a/x/mongo/driver/auth/x509.go b/x/mongo/driver/auth/x509.go index 03a9d750e2..7aa064aaf0 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/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/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/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 6716016924..d3ef0ea6c0 100644 --- a/x/mongo/driver/batch_cursor.go +++ b/x/mongo/driver/batch_cursor.go @@ -14,15 +14,15 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/bson" - "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/internal/driverutil" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "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/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/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 7c9ad38c7b..bf6fff7042 100644 --- a/x/mongo/driver/batch_cursor_test.go +++ b/x/mongo/driver/batch_cursor_test.go @@ -9,7 +9,7 @@ package driver import ( "testing" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" ) func TestBatchCursor(t *testing.T) { diff --git a/x/mongo/driver/batches.go b/x/mongo/driver/batches.go index be430afa15..73812f0587 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/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/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 353368a33c..3bd17affcc 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/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/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 7d0f30c136..441ae34615 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/internal/assert" - "go.mongodb.org/mongo-driver/internal/handshake" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "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" ) func TestCommandMonitoring(t *testing.T) { diff --git a/x/mongo/driver/compression.go b/x/mongo/driver/compression.go index d9a6c68fee..c9f9fd46b2 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/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/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 75a7ff072b..a1d1ed3a09 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/internal/assert" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/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 4465afe3be..53409235c2 100644 --- a/x/mongo/driver/connstring/connstring.go +++ b/x/mongo/driver/connstring/connstring.go @@ -22,10 +22,10 @@ import ( "strings" "time" - "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" + "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" ) const ( diff --git a/x/mongo/driver/connstring/connstring_spec_test.go b/x/mongo/driver/connstring/connstring_spec_test.go index af7b25f385..26c4f53450 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/internal/require" - "go.mongodb.org/mongo-driver/internal/spectest" - "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "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" ) type host struct { diff --git a/x/mongo/driver/connstring/connstring_test.go b/x/mongo/driver/connstring/connstring_test.go index 001cd72fe5..3a3e68a636 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/internal/assert" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + "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" ) func TestAppName(t *testing.T) { diff --git a/x/mongo/driver/crypt.go b/x/mongo/driver/crypt.go index 77e24762b0..4368fd125d 100644 --- a/x/mongo/driver/crypt.go +++ b/x/mongo/driver/crypt.go @@ -15,9 +15,9 @@ import ( "strings" "time" - "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" + "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" ) const ( diff --git a/x/mongo/driver/description/server.go b/x/mongo/driver/description/server.go index a5d9943114..7d2e679a27 100644 --- a/x/mongo/driver/description/server.go +++ b/x/mongo/driver/description/server.go @@ -10,9 +10,9 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/tag" ) // ServerKind represents the type of a single server in a topology. diff --git a/x/mongo/driver/driver.go b/x/mongo/driver/driver.go index b6a95e32da..b22dabdc75 100644 --- a/x/mongo/driver/driver.go +++ b/x/mongo/driver/driver.go @@ -17,11 +17,11 @@ import ( "context" "time" - "go.mongodb.org/mongo-driver/internal/csot" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/internal/csot" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) // 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 e4952cce32..1938122fd6 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/mongo/address" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "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/description" + "go.mongodb.org/mongo-driver/v2/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 b12ac5d396..93f60c83f4 100644 --- a/x/mongo/driver/errors.go +++ b/x/mongo/driver/errors.go @@ -13,10 +13,10 @@ import ( "fmt" "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) // 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 c7cbcfc7d5..554a11961d 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/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/internal/serverselector" - "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" + "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/internal/serverselector" + "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" ) 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 50153c50cc..35fd9fdd99 100644 --- a/x/mongo/driver/integration/compressor_test.go +++ b/x/mongo/driver/integration/compressor_test.go @@ -11,11 +11,11 @@ import ( "os" "testing" - "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" + "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" ) func TestCompression(t *testing.T) { diff --git a/x/mongo/driver/integration/insert_test.go b/x/mongo/driver/integration/insert_test.go index e804967e28..a2687e8dfe 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/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" + "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" ) func TestInsert(t *testing.T) { diff --git a/x/mongo/driver/integration/main_test.go b/x/mongo/driver/integration/main_test.go index 7c72d6d79c..c1b68d27d6 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/internal/integtest" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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" ) var host *string diff --git a/x/mongo/driver/integration/scram_test.go b/x/mongo/driver/integration/scram_test.go index 2a5b77a96e..44aa88255a 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/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/integtest" - "go.mongodb.org/mongo-driver/internal/serverselector" - "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/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/integtest" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "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" ) type scramTestCase struct { diff --git a/x/mongo/driver/mnet/connection.go b/x/mongo/driver/mnet/connection.go index 495c3fe58d..9beff5b1ee 100644 --- a/x/mongo/driver/mnet/connection.go +++ b/x/mongo/driver/mnet/connection.go @@ -10,8 +10,8 @@ import ( "context" "io" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) // ReadWriteCloser represents a Connection where server operations diff --git a/x/mongo/driver/mongocrypt/mongocrypt.go b/x/mongo/driver/mongocrypt/mongocrypt.go index 20f6ff0aa9..db2c6a7609 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/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" + "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" ) type kmsProvider interface { diff --git a/x/mongo/driver/mongocrypt/mongocrypt_context.go b/x/mongo/driver/mongocrypt/mongocrypt_context.go index 04e98d01c1..5a34516533 100644 --- a/x/mongo/driver/mongocrypt/mongocrypt_context.go +++ b/x/mongo/driver/mongocrypt/mongocrypt_context.go @@ -12,7 +12,7 @@ package mongocrypt // #include import "C" import ( - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // Context represents a mongocrypt_ctx_t handle diff --git a/x/mongo/driver/mongocrypt/mongocrypt_context_not_enabled.go b/x/mongo/driver/mongocrypt/mongocrypt_context_not_enabled.go index 734662e715..a04272781b 100644 --- a/x/mongo/driver/mongocrypt/mongocrypt_context_not_enabled.go +++ b/x/mongo/driver/mongocrypt/mongocrypt_context_not_enabled.go @@ -10,7 +10,7 @@ package mongocrypt import ( - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // Context represents a mongocrypt_ctx_t handle diff --git a/x/mongo/driver/mongocrypt/mongocrypt_not_enabled.go b/x/mongo/driver/mongocrypt/mongocrypt_not_enabled.go index 80f500085c..6e21e64917 100644 --- a/x/mongo/driver/mongocrypt/mongocrypt_not_enabled.go +++ b/x/mongo/driver/mongocrypt/mongocrypt_not_enabled.go @@ -19,8 +19,8 @@ package mongocrypt import ( "context" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mongocrypt/options" ) const cseNotSupportedMsg = "client-side encryption not enabled. add the cse build tag to support" diff --git a/x/mongo/driver/mongocrypt/mongocrypt_test.go b/x/mongo/driver/mongocrypt/mongocrypt_test.go index 67c4577f98..964991d537 100644 --- a/x/mongo/driver/mongocrypt/mongocrypt_test.go +++ b/x/mongo/driver/mongocrypt/mongocrypt_test.go @@ -18,9 +18,9 @@ import ( "strings" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options" + "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/mongocrypt/options" ) const resourcesDir = "../../../../testdata/mongocrypt" diff --git a/x/mongo/driver/mongocrypt/options/mongocrypt_context_options.go b/x/mongo/driver/mongocrypt/options/mongocrypt_context_options.go index 75d56f0585..f2ee6a3a50 100644 --- a/x/mongo/driver/mongocrypt/options/mongocrypt_context_options.go +++ b/x/mongo/driver/mongocrypt/options/mongocrypt_context_options.go @@ -7,8 +7,8 @@ package options import ( - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // DataKeyOptions specifies options for creating a new data key. diff --git a/x/mongo/driver/mongocrypt/options/mongocrypt_options.go b/x/mongo/driver/mongocrypt/options/mongocrypt_options.go index d800bc8db7..c6474a4b0b 100644 --- a/x/mongo/driver/mongocrypt/options/mongocrypt_options.go +++ b/x/mongo/driver/mongocrypt/options/mongocrypt_options.go @@ -9,7 +9,7 @@ package options import ( "net/http" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // MongoCryptOptions specifies options to configure a MongoCrypt instance. diff --git a/x/mongo/driver/ocsp/cache_test.go b/x/mongo/driver/ocsp/cache_test.go index 047b749969..dd5d162dbd 100644 --- a/x/mongo/driver/ocsp/cache_test.go +++ b/x/mongo/driver/ocsp/cache_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/assert" "golang.org/x/crypto/ocsp" ) diff --git a/x/mongo/driver/ocsp/config.go b/x/mongo/driver/ocsp/config.go index 5b720cd590..5f2e944d0d 100644 --- a/x/mongo/driver/ocsp/config.go +++ b/x/mongo/driver/ocsp/config.go @@ -12,7 +12,7 @@ import ( "fmt" "net/http" - "go.mongodb.org/mongo-driver/internal/httputil" + "go.mongodb.org/mongo-driver/v2/internal/httputil" "golang.org/x/crypto/ocsp" ) diff --git a/x/mongo/driver/ocsp/ocsp_test.go b/x/mongo/driver/ocsp/ocsp_test.go index 707be581e0..58a89315bb 100644 --- a/x/mongo/driver/ocsp/ocsp_test.go +++ b/x/mongo/driver/ocsp/ocsp_test.go @@ -16,8 +16,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/httputil" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/httputil" ) func TestContactResponders(t *testing.T) { diff --git a/x/mongo/driver/operation.go b/x/mongo/driver/operation.go index 61110e5467..88ea71f9db 100644 --- a/x/mongo/driver/operation.go +++ b/x/mongo/driver/operation.go @@ -18,22 +18,22 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/csot" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/handshake" - "go.mongodb.org/mongo-driver/internal/logger" - "go.mongodb.org/mongo-driver/internal/serverselector" - "go.mongodb.org/mongo-driver/mongo/address" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/csot" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/handshake" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) const defaultLocalThreshold = 15 * time.Millisecond diff --git a/x/mongo/driver/operation/abort_transaction.go b/x/mongo/driver/operation/abort_transaction.go index 9aa5bd4e32..f851282efe 100644 --- a/x/mongo/driver/operation/abort_transaction.go +++ b/x/mongo/driver/operation/abort_transaction.go @@ -10,13 +10,13 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // AbortTransaction performs an abortTransaction operation. diff --git a/x/mongo/driver/operation/aggregate.go b/x/mongo/driver/operation/aggregate.go index 92c0186a49..69ef6e09b0 100644 --- a/x/mongo/driver/operation/aggregate.go +++ b/x/mongo/driver/operation/aggregate.go @@ -11,15 +11,15 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Aggregate represents an aggregate operation. diff --git a/x/mongo/driver/operation/command.go b/x/mongo/driver/operation/command.go index 86f61ee98d..0b952b07cd 100644 --- a/x/mongo/driver/operation/command.go +++ b/x/mongo/driver/operation/command.go @@ -11,13 +11,13 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/logger" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Command is used to run a generic operation. diff --git a/x/mongo/driver/operation/commit_transaction.go b/x/mongo/driver/operation/commit_transaction.go index b014affd15..e2e4e7b20b 100644 --- a/x/mongo/driver/operation/commit_transaction.go +++ b/x/mongo/driver/operation/commit_transaction.go @@ -10,13 +10,13 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // CommitTransaction attempts to commit a transaction. diff --git a/x/mongo/driver/operation/count.go b/x/mongo/driver/operation/count.go index 6aac998bf5..c8480475f4 100644 --- a/x/mongo/driver/operation/count.go +++ b/x/mongo/driver/operation/count.go @@ -12,14 +12,14 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Count represents a count operation. diff --git a/x/mongo/driver/operation/create.go b/x/mongo/driver/operation/create.go index b1e40f977c..2896e02cbf 100644 --- a/x/mongo/driver/operation/create.go +++ b/x/mongo/driver/operation/create.go @@ -10,13 +10,13 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Create represents a create operation. diff --git a/x/mongo/driver/operation/create_indexes.go b/x/mongo/driver/operation/create_indexes.go index 06c8fd8118..5a49a7d1a6 100644 --- a/x/mongo/driver/operation/create_indexes.go +++ b/x/mongo/driver/operation/create_indexes.go @@ -12,13 +12,13 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // CreateIndexes performs a createIndexes operation. diff --git a/x/mongo/driver/operation/create_search_indexes.go b/x/mongo/driver/operation/create_search_indexes.go index 8856651e6e..dac561ff85 100644 --- a/x/mongo/driver/operation/create_search_indexes.go +++ b/x/mongo/driver/operation/create_search_indexes.go @@ -12,12 +12,12 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // CreateSearchIndexes performs a createSearchIndexes operation. diff --git a/x/mongo/driver/operation/delete.go b/x/mongo/driver/operation/delete.go index 4214393017..b9e21465c1 100644 --- a/x/mongo/driver/operation/delete.go +++ b/x/mongo/driver/operation/delete.go @@ -12,14 +12,14 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/logger" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Delete performs a delete operation diff --git a/x/mongo/driver/operation/distinct.go b/x/mongo/driver/operation/distinct.go index a59e4ced35..3ace8fc2ed 100644 --- a/x/mongo/driver/operation/distinct.go +++ b/x/mongo/driver/operation/distinct.go @@ -11,14 +11,14 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Distinct performs a distinct operation. diff --git a/x/mongo/driver/operation/drop_collection.go b/x/mongo/driver/operation/drop_collection.go index 5e98886024..98cbee7bb9 100644 --- a/x/mongo/driver/operation/drop_collection.go +++ b/x/mongo/driver/operation/drop_collection.go @@ -12,13 +12,13 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // DropCollection performs a drop operation. diff --git a/x/mongo/driver/operation/drop_database.go b/x/mongo/driver/operation/drop_database.go index a2c3daae58..a10c02c63b 100644 --- a/x/mongo/driver/operation/drop_database.go +++ b/x/mongo/driver/operation/drop_database.go @@ -10,13 +10,13 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // DropDatabase performs a dropDatabase operation diff --git a/x/mongo/driver/operation/drop_indexes.go b/x/mongo/driver/operation/drop_indexes.go index a758f34970..00b8f41c7f 100644 --- a/x/mongo/driver/operation/drop_indexes.go +++ b/x/mongo/driver/operation/drop_indexes.go @@ -12,13 +12,13 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // DropIndexes performs an dropIndexes operation. diff --git a/x/mongo/driver/operation/drop_search_index.go b/x/mongo/driver/operation/drop_search_index.go index d060234360..53dd487029 100644 --- a/x/mongo/driver/operation/drop_search_index.go +++ b/x/mongo/driver/operation/drop_search_index.go @@ -12,11 +12,11 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // DropSearchIndex performs an dropSearchIndex operation. diff --git a/x/mongo/driver/operation/end_sessions.go b/x/mongo/driver/operation/end_sessions.go index a96cb2789b..43b8a1201d 100644 --- a/x/mongo/driver/operation/end_sessions.go +++ b/x/mongo/driver/operation/end_sessions.go @@ -10,12 +10,12 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // EndSessions performs an endSessions operation. diff --git a/x/mongo/driver/operation/find.go b/x/mongo/driver/operation/find.go index bdbad6d610..468dbb610d 100644 --- a/x/mongo/driver/operation/find.go +++ b/x/mongo/driver/operation/find.go @@ -11,15 +11,15 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/logger" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Find performs a find operation. diff --git a/x/mongo/driver/operation/find_and_modify.go b/x/mongo/driver/operation/find_and_modify.go index 51af9ffbcf..3b3c3ab89f 100644 --- a/x/mongo/driver/operation/find_and_modify.go +++ b/x/mongo/driver/operation/find_and_modify.go @@ -12,14 +12,14 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // FindAndModify performs a findAndModify operation. diff --git a/x/mongo/driver/operation/hello.go b/x/mongo/driver/operation/hello.go index 9a3993120f..bf4bc914b0 100644 --- a/x/mongo/driver/operation/hello.go +++ b/x/mongo/driver/operation/hello.go @@ -14,17 +14,17 @@ import ( "strconv" "strings" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/bsonutil" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/handshake" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/version" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/bsonutil" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/handshake" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/version" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // maxClientMetadataSize is the maximum size of the client metadata document diff --git a/x/mongo/driver/operation/hello_test.go b/x/mongo/driver/operation/hello_test.go index 6bfaf00f6d..23db7d1bac 100644 --- a/x/mongo/driver/operation/hello_test.go +++ b/x/mongo/driver/operation/hello_test.go @@ -12,12 +12,12 @@ import ( "runtime" "testing" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/version" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/version" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func assertDocsEqual(t *testing.T, got bsoncore.Document, want []byte) { diff --git a/x/mongo/driver/operation/insert.go b/x/mongo/driver/operation/insert.go index 0fe6ca8c82..5909767f13 100644 --- a/x/mongo/driver/operation/insert.go +++ b/x/mongo/driver/operation/insert.go @@ -12,14 +12,14 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/logger" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Insert performs an insert operation. diff --git a/x/mongo/driver/operation/listDatabases.go b/x/mongo/driver/operation/listDatabases.go index 2dc4946f20..b6b070510f 100644 --- a/x/mongo/driver/operation/listDatabases.go +++ b/x/mongo/driver/operation/listDatabases.go @@ -12,14 +12,14 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // ListDatabases performs a listDatabases operation. diff --git a/x/mongo/driver/operation/list_collections.go b/x/mongo/driver/operation/list_collections.go index f208915f87..9bf8db8630 100644 --- a/x/mongo/driver/operation/list_collections.go +++ b/x/mongo/driver/operation/list_collections.go @@ -11,13 +11,13 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // ListCollections performs a listCollections operation. diff --git a/x/mongo/driver/operation/list_indexes.go b/x/mongo/driver/operation/list_indexes.go index a14873a7ac..57d90e46f9 100644 --- a/x/mongo/driver/operation/list_indexes.go +++ b/x/mongo/driver/operation/list_indexes.go @@ -11,12 +11,12 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // ListIndexes performs a listIndexes operation. diff --git a/x/mongo/driver/operation/update.go b/x/mongo/driver/operation/update.go index d470e82d21..a47de01817 100644 --- a/x/mongo/driver/operation/update.go +++ b/x/mongo/driver/operation/update.go @@ -12,15 +12,15 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/logger" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // Update performs an update operation. diff --git a/x/mongo/driver/operation/update_search_index.go b/x/mongo/driver/operation/update_search_index.go index f9f238f409..a1539a6e48 100644 --- a/x/mongo/driver/operation/update_search_index.go +++ b/x/mongo/driver/operation/update_search_index.go @@ -12,11 +12,11 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) // UpdateSearchIndex performs a updateSearchIndex operation. diff --git a/x/mongo/driver/operation_exhaust.go b/x/mongo/driver/operation_exhaust.go index e3a220b3ac..a05a37c138 100644 --- a/x/mongo/driver/operation_exhaust.go +++ b/x/mongo/driver/operation_exhaust.go @@ -10,7 +10,7 @@ import ( "context" "errors" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) // ExecuteExhaust reads a response from the provided StreamerConnection. This will error if the connection's diff --git a/x/mongo/driver/operation_test.go b/x/mongo/driver/operation_test.go index f209134b79..7f8c496f8a 100644 --- a/x/mongo/driver/operation_test.go +++ b/x/mongo/driver/operation_test.go @@ -14,22 +14,22 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/csot" - "go.mongodb.org/mongo-driver/internal/handshake" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/internal/uuid" - "go.mongodb.org/mongo-driver/mongo/address" - "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/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/csot" + "go.mongodb.org/mongo-driver/v2/internal/handshake" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/uuid" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) func noerr(t *testing.T, err error) { diff --git a/x/mongo/driver/session/client_session.go b/x/mongo/driver/session/client_session.go index 4228c4e98f..16328c645c 100644 --- a/x/mongo/driver/session/client_session.go +++ b/x/mongo/driver/session/client_session.go @@ -10,15 +10,15 @@ import ( "errors" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/uuid" - "go.mongodb.org/mongo-driver/mongo/address" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/uuid" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" ) // ErrSessionEnded is returned when a client session is used after a call to endSession(). diff --git a/x/mongo/driver/session/client_session_test.go b/x/mongo/driver/session/client_session_test.go index bdf8889732..78a6f18d90 100644 --- a/x/mongo/driver/session/client_session_test.go +++ b/x/mongo/driver/session/client_session_test.go @@ -11,12 +11,12 @@ import ( "errors" "testing" - "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/internal/uuid" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "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/internal/uuid" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) var consistent = true diff --git a/x/mongo/driver/session/cluster_clock.go b/x/mongo/driver/session/cluster_clock.go index 961f2274e2..9f6c14c214 100644 --- a/x/mongo/driver/session/cluster_clock.go +++ b/x/mongo/driver/session/cluster_clock.go @@ -9,7 +9,7 @@ package session import ( "sync" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // ClusterClock represents a logical clock for keeping track of cluster time. diff --git a/x/mongo/driver/session/cluster_clock_test.go b/x/mongo/driver/session/cluster_clock_test.go index b2d4626b9d..b3a8415f4c 100644 --- a/x/mongo/driver/session/cluster_clock_test.go +++ b/x/mongo/driver/session/cluster_clock_test.go @@ -10,7 +10,7 @@ import ( "bytes" "testing" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestClusterClock(t *testing.T) { diff --git a/x/mongo/driver/session/options.go b/x/mongo/driver/session/options.go index 67749f09cb..742b3738cf 100644 --- a/x/mongo/driver/session/options.go +++ b/x/mongo/driver/session/options.go @@ -7,9 +7,9 @@ package session import ( - "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/v2/mongo/readconcern" + "go.mongodb.org/mongo-driver/v2/mongo/readpref" + "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" ) // ClientOptions represents all possible options for creating a client session. diff --git a/x/mongo/driver/session/server_session.go b/x/mongo/driver/session/server_session.go index 73fce5f21d..7d9c00213d 100644 --- a/x/mongo/driver/session/server_session.go +++ b/x/mongo/driver/session/server_session.go @@ -9,9 +9,9 @@ package session import ( "time" - "go.mongodb.org/mongo-driver/internal/uuid" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/internal/uuid" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) // Server is an open session with the server. diff --git a/x/mongo/driver/session/server_session_test.go b/x/mongo/driver/session/server_session_test.go index b89d0963ff..b8e4051575 100644 --- a/x/mongo/driver/session/server_session_test.go +++ b/x/mongo/driver/session/server_session_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) func TestServerSession(t *testing.T) { diff --git a/x/mongo/driver/session/session_pool.go b/x/mongo/driver/session/session_pool.go index 2612540ba5..df93303070 100644 --- a/x/mongo/driver/session/session_pool.go +++ b/x/mongo/driver/session/session_pool.go @@ -10,8 +10,8 @@ import ( "sync" "sync/atomic" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) // Node represents a server session in a linked list diff --git a/x/mongo/driver/session/session_pool_test.go b/x/mongo/driver/session/session_pool_test.go index e645acdc09..a5f64bcd2f 100644 --- a/x/mongo/driver/session/session_pool_test.go +++ b/x/mongo/driver/session/session_pool_test.go @@ -10,8 +10,8 @@ import ( "bytes" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) func TestSessionPool(t *testing.T) { diff --git a/x/mongo/driver/topology/CMAP_spec_test.go b/x/mongo/driver/topology/CMAP_spec_test.go index d65c97ca3d..aaec9f36c5 100644 --- a/x/mongo/driver/topology/CMAP_spec_test.go +++ b/x/mongo/driver/topology/CMAP_spec_test.go @@ -19,12 +19,12 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/internal/spectest" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "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/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" ) // skippedTestDescriptions is a collection of test descriptions that the test runner will skip. The diff --git a/x/mongo/driver/topology/cmap_prose_test.go b/x/mongo/driver/topology/cmap_prose_test.go index 9c83b7a9c5..0524b99e9c 100644 --- a/x/mongo/driver/topology/cmap_prose_test.go +++ b/x/mongo/driver/topology/cmap_prose_test.go @@ -13,10 +13,10 @@ import ( "testing" "time" - "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/x/mongo/driver/operation" + "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/x/mongo/driver/operation" ) func TestCMAPProse(t *testing.T) { diff --git a/x/mongo/driver/topology/connection.go b/x/mongo/driver/topology/connection.go index cd35c6f66d..a7583a5c15 100644 --- a/x/mongo/driver/topology/connection.go +++ b/x/mongo/driver/topology/connection.go @@ -18,14 +18,14 @@ import ( "sync/atomic" "time" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/ocsp" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "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" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/ocsp" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) // Connection state constants. diff --git a/x/mongo/driver/topology/connection_errors_test.go b/x/mongo/driver/topology/connection_errors_test.go index 97a9f57d0e..0a7259035d 100644 --- a/x/mongo/driver/topology/connection_errors_test.go +++ b/x/mongo/driver/topology/connection_errors_test.go @@ -15,9 +15,9 @@ import ( "net" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/mongo/driver/auth" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth" ) func TestConnectionErrors(t *testing.T) { diff --git a/x/mongo/driver/topology/connection_options.go b/x/mongo/driver/topology/connection_options.go index f45da5d460..6a53da7b61 100644 --- a/x/mongo/driver/topology/connection_options.go +++ b/x/mongo/driver/topology/connection_options.go @@ -13,11 +13,11 @@ import ( "net/http" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/httputil" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/ocsp" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/httputil" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/ocsp" ) // Dialer is used to make network connections. diff --git a/x/mongo/driver/topology/connection_test.go b/x/mongo/driver/topology/connection_test.go index b5158c596d..2e520d5ee6 100644 --- a/x/mongo/driver/topology/connection_test.go +++ b/x/mongo/driver/topology/connection_test.go @@ -18,12 +18,12 @@ import ( "time" "github.com/google/go-cmp/cmp" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) type testHandshaker struct { diff --git a/x/mongo/driver/topology/diff.go b/x/mongo/driver/topology/diff.go index 3bb7e55ed6..bd1b1d1c6f 100644 --- a/x/mongo/driver/topology/diff.go +++ b/x/mongo/driver/topology/diff.go @@ -6,7 +6,7 @@ package topology -import "go.mongodb.org/mongo-driver/x/mongo/driver/description" +import "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" // hostlistDiff is the difference between a topology and a host list. type hostlistDiff struct { diff --git a/x/mongo/driver/topology/diff_test.go b/x/mongo/driver/topology/diff_test.go index ab0f85b075..f2de2a8555 100644 --- a/x/mongo/driver/topology/diff_test.go +++ b/x/mongo/driver/topology/diff_test.go @@ -9,8 +9,8 @@ package topology import ( "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) func TestDiffHostList(t *testing.T) { diff --git a/x/mongo/driver/topology/errors.go b/x/mongo/driver/topology/errors.go index 5e7c4e0f53..79f11f7f79 100644 --- a/x/mongo/driver/topology/errors.go +++ b/x/mongo/driver/topology/errors.go @@ -12,7 +12,7 @@ import ( "fmt" "time" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) // ConnectionError represents a connection error. diff --git a/x/mongo/driver/topology/example_test.go b/x/mongo/driver/topology/example_test.go index b385a297f8..f2ed63f896 100644 --- a/x/mongo/driver/topology/example_test.go +++ b/x/mongo/driver/topology/example_test.go @@ -9,7 +9,7 @@ package topology_test import ( "log" - "go.mongodb.org/mongo-driver/x/mongo/driver/topology" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) func Example_clusterMonitoring() { diff --git a/x/mongo/driver/topology/fsm.go b/x/mongo/driver/topology/fsm.go index 7529253b86..17f8628afa 100644 --- a/x/mongo/driver/topology/fsm.go +++ b/x/mongo/driver/topology/fsm.go @@ -11,11 +11,11 @@ import ( "fmt" "sync/atomic" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/ptrutil" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/ptrutil" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) var ( diff --git a/x/mongo/driver/topology/fsm_test.go b/x/mongo/driver/topology/fsm_test.go index b84be8fe30..b7a3321ee5 100644 --- a/x/mongo/driver/topology/fsm_test.go +++ b/x/mongo/driver/topology/fsm_test.go @@ -10,8 +10,8 @@ import ( "fmt" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) func TestFSMSessionTimeout(t *testing.T) { diff --git a/x/mongo/driver/topology/polling_srv_records_test.go b/x/mongo/driver/topology/polling_srv_records_test.go index b824de88e7..e6d78a56f8 100644 --- a/x/mongo/driver/topology/polling_srv_records_test.go +++ b/x/mongo/driver/topology/polling_srv_records_test.go @@ -15,12 +15,12 @@ import ( "testing" "time" - "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/options" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/dns" + "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/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/dns" ) type mockResolver struct { diff --git a/x/mongo/driver/topology/pool.go b/x/mongo/driver/topology/pool.go index 4a1b82b431..bd35af8a3f 100644 --- a/x/mongo/driver/topology/pool.go +++ b/x/mongo/driver/topology/pool.go @@ -14,11 +14,11 @@ import ( "sync/atomic" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/logger" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" ) // Connection pool state constants. diff --git a/x/mongo/driver/topology/pool_generation_counter.go b/x/mongo/driver/topology/pool_generation_counter.go index a0d804af40..dec4c699f0 100644 --- a/x/mongo/driver/topology/pool_generation_counter.go +++ b/x/mongo/driver/topology/pool_generation_counter.go @@ -10,7 +10,7 @@ import ( "sync" "sync/atomic" - "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/v2/bson" ) // Pool generation state constants. diff --git a/x/mongo/driver/topology/pool_test.go b/x/mongo/driver/topology/pool_test.go index 69a7cce726..47f7f0bb7e 100644 --- a/x/mongo/driver/topology/pool_test.go +++ b/x/mongo/driver/topology/pool_test.go @@ -14,14 +14,14 @@ import ( "testing" "time" - "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/address" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "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/address" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" ) func TestPool(t *testing.T) { diff --git a/x/mongo/driver/topology/rtt_monitor.go b/x/mongo/driver/topology/rtt_monitor.go index 03bcc06aa9..525822a16d 100644 --- a/x/mongo/driver/topology/rtt_monitor.go +++ b/x/mongo/driver/topology/rtt_monitor.go @@ -13,9 +13,9 @@ import ( "sync" "time" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" ) const ( diff --git a/x/mongo/driver/topology/rtt_monitor_test.go b/x/mongo/driver/topology/rtt_monitor_test.go index f2677c8979..c53535a8f2 100644 --- a/x/mongo/driver/topology/rtt_monitor_test.go +++ b/x/mongo/driver/topology/rtt_monitor_test.go @@ -17,14 +17,14 @@ import ( "testing" "time" - "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/x/bsonx/bsoncore" - "go.mongodb.org/mongo-driver/x/mongo/driver" - "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "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/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" ) func makeHelloReply() []byte { diff --git a/x/mongo/driver/topology/sdam_spec_test.go b/x/mongo/driver/topology/sdam_spec_test.go index 65e3213a3c..789881501a 100644 --- a/x/mongo/driver/topology/sdam_spec_test.go +++ b/x/mongo/driver/topology/sdam_spec_test.go @@ -16,16 +16,16 @@ import ( "testing" "time" - "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/driverutil" - "go.mongodb.org/mongo-driver/internal/spectest" - "go.mongodb.org/mongo-driver/mongo/address" - "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/description" + "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/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/spectest" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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/description" ) type response struct { diff --git a/x/mongo/driver/topology/server.go b/x/mongo/driver/topology/server.go index 8d53dfd62e..499ca2a58a 100644 --- a/x/mongo/driver/topology/server.go +++ b/x/mongo/driver/topology/server.go @@ -15,16 +15,16 @@ import ( "sync/atomic" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/logger" - "go.mongodb.org/mongo-driver/mongo/address" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" ) const minHeartbeatInterval = 500 * time.Millisecond diff --git a/x/mongo/driver/topology/server_options.go b/x/mongo/driver/topology/server_options.go index bfd1218d12..8d86d5bd85 100644 --- a/x/mongo/driver/topology/server_options.go +++ b/x/mongo/driver/topology/server_options.go @@ -9,12 +9,12 @@ package topology import ( "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/logger" - "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/session" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "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/session" ) var defaultRegistry = bson.NewRegistry() diff --git a/x/mongo/driver/topology/server_rtt_test.go b/x/mongo/driver/topology/server_rtt_test.go index a55f3d2f19..e13fe8f2c1 100644 --- a/x/mongo/driver/topology/server_rtt_test.go +++ b/x/mongo/driver/topology/server_rtt_test.go @@ -13,8 +13,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/spectest" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/spectest" ) // Test case for all server selection rtt spec tests. diff --git a/x/mongo/driver/topology/server_test.go b/x/mongo/driver/topology/server_test.go index 8b18d2408c..47a55f395a 100644 --- a/x/mongo/driver/topology/server_test.go +++ b/x/mongo/driver/topology/server_test.go @@ -24,20 +24,20 @@ import ( "time" "github.com/google/go-cmp/cmp" - "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/address" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/drivertest" - "go.mongodb.org/mongo-driver/x/mongo/driver/mnet" - "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" + "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/address" + "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/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) type channelNetConnDialer struct{} diff --git a/x/mongo/driver/topology/topology.go b/x/mongo/driver/topology/topology.go index 60077cea85..5c1e1342da 100644 --- a/x/mongo/driver/topology/topology.go +++ b/x/mongo/driver/topology/topology.go @@ -30,17 +30,17 @@ import ( "sync/atomic" "time" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/driverutil" - "go.mongodb.org/mongo-driver/internal/logger" - "go.mongodb.org/mongo-driver/internal/randutil" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/mongo/options" - "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/description" - "go.mongodb.org/mongo-driver/x/mongo/driver/dns" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/driverutil" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/randutil" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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/connstring" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/dns" ) // Topology state constants. diff --git a/x/mongo/driver/topology/topology_errors_test.go b/x/mongo/driver/topology/topology_errors_test.go index 612735bd3b..5a96d135ac 100644 --- a/x/mongo/driver/topology/topology_errors_test.go +++ b/x/mongo/driver/topology/topology_errors_test.go @@ -16,9 +16,9 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/internal/serverselector" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) var selectNone serverselector.Func = func(description.Topology, []description.Server) ([]description.Server, error) { diff --git a/x/mongo/driver/topology/topology_options.go b/x/mongo/driver/topology/topology_options.go index 5f9afad69d..ede32601fc 100644 --- a/x/mongo/driver/topology/topology_options.go +++ b/x/mongo/driver/topology/topology_options.go @@ -13,15 +13,15 @@ import ( "strings" "time" - "go.mongodb.org/mongo-driver/event" - "go.mongodb.org/mongo-driver/internal/logger" - "go.mongodb.org/mongo-driver/internal/mongoutil" - "go.mongodb.org/mongo-driver/mongo/options" - "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/ocsp" - "go.mongodb.org/mongo-driver/x/mongo/driver/operation" - "go.mongodb.org/mongo-driver/x/mongo/driver/session" + "go.mongodb.org/mongo-driver/v2/event" + "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/mongoutil" + "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/auth" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/ocsp" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" ) const defaultServerSelectionTimeout = 30 * time.Second diff --git a/x/mongo/driver/topology/topology_options_test.go b/x/mongo/driver/topology/topology_options_test.go index 1b6140f5dc..e31adff87c 100644 --- a/x/mongo/driver/topology/topology_options_test.go +++ b/x/mongo/driver/topology/topology_options_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/options" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/mongo/options" ) func TestDirectConnectionFromConnString(t *testing.T) { diff --git a/x/mongo/driver/topology/topology_test.go b/x/mongo/driver/topology/topology_test.go index 9ecda0b87f..c55db8b778 100644 --- a/x/mongo/driver/topology/topology_test.go +++ b/x/mongo/driver/topology/topology_test.go @@ -16,15 +16,15 @@ import ( "testing" "time" - "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/internal/serverselector" - "go.mongodb.org/mongo-driver/internal/spectest" - "go.mongodb.org/mongo-driver/mongo/address" - "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/mongo/readpref" - "go.mongodb.org/mongo-driver/x/mongo/driver/description" + "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/internal/serverselector" + "go.mongodb.org/mongo-driver/v2/internal/spectest" + "go.mongodb.org/mongo-driver/v2/mongo/address" + "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/description" ) const testTimeout = 2 * time.Second diff --git a/x/mongo/driver/wiremessage/wiremessage.go b/x/mongo/driver/wiremessage/wiremessage.go index 2199f855ba..33cc5c402f 100644 --- a/x/mongo/driver/wiremessage/wiremessage.go +++ b/x/mongo/driver/wiremessage/wiremessage.go @@ -19,7 +19,7 @@ import ( "strings" "sync/atomic" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) // WireMessage represents a MongoDB wire message in binary form. diff --git a/x/mongo/driver/wiremessage/wiremessage_test.go b/x/mongo/driver/wiremessage/wiremessage_test.go index 26cb2637a6..04698b1d2f 100644 --- a/x/mongo/driver/wiremessage/wiremessage_test.go +++ b/x/mongo/driver/wiremessage/wiremessage_test.go @@ -10,8 +10,8 @@ import ( "math" "testing" - "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" ) func TestAppendHeaderStart(t *testing.T) {