Skip to content

Commit

Permalink
V2 mod upgrade (#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez authored Jul 25, 2024
1 parent e31ff26 commit a1c9341
Show file tree
Hide file tree
Showing 377 changed files with 1,556 additions and 1,557 deletions.
2 changes: 1 addition & 1 deletion bson/array_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions bson/bson_corpus_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions bson/bson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/bsonrw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion bson/cond_addr_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/copier.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions bson/copier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions bson/decimal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion bson/decoder_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"fmt"
"io"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/v2/bson"
)

func ExampleDecoder() {
Expand Down
6 changes: 3 additions & 3 deletions bson/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/default_value_decoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions bson/default_value_decoders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/default_value_encoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions bson/default_value_encoders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion bson/encoder_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"fmt"
"io"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/v2/bson"
)

func ExampleEncoder() {
Expand Down
6 changes: 3 additions & 3 deletions bson/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion bson/extjson_prose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/extjson_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/extjson_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions bson/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions bson/marshal_value_cases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bson/marshal_value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions bson/mgocompat/bson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bson/mgocompat/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bson/objectid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions bson/primitive_codecs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion bson/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion bson/raw_array.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions bson/raw_array_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/raw_element.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions bson/raw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion bson/raw_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions bson/raw_value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion bson/registry_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"math"
"reflect"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/v2/bson"
)

func ExampleRegistry_customEncoder() {
Expand Down
2 changes: 1 addition & 1 deletion bson/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion bson/struct_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
4 changes: 2 additions & 2 deletions bson/time_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit a1c9341

Please sign in to comment.