Skip to content

Commit

Permalink
GODRIVER-2690 Defere v2 endpoint until v2 work is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez committed Sep 18, 2023
1 parent 40441e3 commit 1d708a6
Show file tree
Hide file tree
Showing 444 changed files with 1,781 additions and 1,787 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center"><img src="etc/assets/mongo-gopher.png" width="250"></p>
<p align="center">
<a href="https://goreportcard.com/report/go.mongodb.org/mongo-driver/v2"><img src="https://goreportcard.com/badge/go.mongodb.org/mongo-driver/v2"></a>
<a href="https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/mongo"><img src="etc/assets/godev-mongo-blue.svg" alt="docs"></a>
<a href="https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/bson"><img src="etc/assets/godev-bson-blue.svg" alt="docs"></a>
<a href="https://goreportcard.com/report/go.mongodb.org/mongo-driver"><img src="https://goreportcard.com/badge/go.mongodb.org/mongo-driver"></a>
<a href="https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo"><img src="etc/assets/godev-mongo-blue.svg" alt="docs"></a>
<a href="https://pkg.go.dev/go.mongodb.org/mongo-driver/bson"><img src="etc/assets/godev-bson-blue.svg" alt="docs"></a>
<a href="https://www.mongodb.com/docs/drivers/go/current/"><img src="etc/assets/docs-mongodb-green.svg"></a>
</p>

Expand Down Expand Up @@ -44,9 +44,9 @@ import (
"context"
"time"

"go.mongodb.org/mongo-driver/v2/mongo"
"go.mongodb.org/mongo-driver/v2/mongo/options"
"go.mongodb.org/mongo-driver/v2/mongo/readpref"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/readpref"
)

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
Expand All @@ -64,7 +64,7 @@ defer func() {
}()
```

For more advanced configuration and authentication, see the [documentation for mongo.Connect](https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/mongo#Connect).
For more advanced configuration and authentication, see the [documentation for mongo.Connect](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Connect).

Calling `Connect` does not block for server discovery. If you wish to know if a MongoDB server has been found and connected to,
use the `Ping` method:
Expand All @@ -90,7 +90,7 @@ res, err := collection.InsertOne(ctx, bson.D{{"name", "pi"}, {"value", 3.14159}}
id := res.InsertedID
```

To use `bson.D`, you will need to add `"go.mongodb.org/mongo-driver/v2/bson"` to your imports.
To use `bson.D`, you will need to add `"go.mongodb.org/mongo-driver/bson"` to your imports.

Your import statement should now look like this:

Expand All @@ -100,10 +100,10 @@ import (
"log"
"time"

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

Expand Down
2 changes: 1 addition & 1 deletion benchmark/bson.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"io/ioutil"
"path/filepath"

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

const (
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bson_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"context"
"errors"

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

func bsonDocumentEncoding(tm TimerManager, iters int, source string) error {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bson_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"errors"
"fmt"

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

func bsonMapDecoding(tm TimerManager, iters int, dataSet string) error {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bson_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"context"
"errors"

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

func BSONFlatStructDecoding(_ context.Context, tm TimerManager, iters int) error {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bson_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

package benchmark

import "go.mongodb.org/mongo-driver/v2/bson/primitive"
import "go.mongodb.org/mongo-driver/bson/primitive"

type flatBSONTags struct {
ID primitive.ObjectID `bson:"_id"`
Expand Down
4 changes: 2 additions & 2 deletions benchmark/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

package benchmark // import "go.mongodb.org/mongo-driver/v2/benchmark"
package benchmark // import "go.mongodb.org/mongo-driver/benchmark"

import (
"context"
"testing"
"time"

"go.mongodb.org/mongo-driver/v2/internal/require"
"go.mongodb.org/mongo-driver/internal/require"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion benchmark/multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"context"
"errors"

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

func MultiFindMany(ctx context.Context, tm TimerManager, iters int) error {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"context"
"testing"

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

var teststrings = []string{
Expand Down
10 changes: 5 additions & 5 deletions benchmark/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"context"
"errors"

"go.mongodb.org/mongo-driver/v2/bson"
"go.mongodb.org/mongo-driver/v2/internal/handshake"
"go.mongodb.org/mongo-driver/v2/internal/integtest"
"go.mongodb.org/mongo-driver/v2/mongo"
"go.mongodb.org/mongo-driver/v2/mongo/options"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/internal/handshake"
"go.mongodb.org/mongo-driver/internal/integtest"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions bson/bson.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// Based on gopkg.in/mgo.v2/bson by Gustavo Niemeyer
// See THIRD-PARTY-NOTICES for original license terms.

package bson // import "go.mongodb.org/mongo-driver/v2/bson"
package bson // import "go.mongodb.org/mongo-driver/bson"

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

// Zeroer allows custom struct types to implement a report of zero
Expand Down
6 changes: 3 additions & 3 deletions bson/bson_corpus_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"unicode/utf8"

"github.com/google/go-cmp/cmp"
"go.mongodb.org/mongo-driver/v2/bson/primitive"
"go.mongodb.org/mongo-driver/v2/internal/assert"
"go.mongodb.org/mongo-driver/v2/internal/require"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/internal/assert"
"go.mongodb.org/mongo-driver/internal/require"
)

type testCase struct {
Expand Down
10 changes: 5 additions & 5 deletions bson/bson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"go.mongodb.org/mongo-driver/v2/bson/bsoncodec"
"go.mongodb.org/mongo-driver/v2/bson/bsonoptions"
"go.mongodb.org/mongo-driver/v2/bson/bsontype"
"go.mongodb.org/mongo-driver/v2/internal/assert"
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"go.mongodb.org/mongo-driver/bson/bsonoptions"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/internal/assert"
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)

func noerr(t *testing.T, err error) {
Expand Down
4 changes: 2 additions & 2 deletions bson/bsoncodec/array_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package bsoncodec
import (
"reflect"

"go.mongodb.org/mongo-driver/v2/bson/bsonrw"
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)

// ArrayCodec is the Codec used for bsoncore.Array values.
Expand Down
8 changes: 4 additions & 4 deletions bson/bsoncodec/bsoncodec.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

package bsoncodec // import "go.mongodb.org/mongo-driver/v2/bson/bsoncodec"
package bsoncodec // import "go.mongodb.org/mongo-driver/bson/bsoncodec"

import (
"fmt"
"reflect"
"strings"

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

var (
Expand Down
6 changes: 3 additions & 3 deletions bson/bsoncodec/bsoncodec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"testing"
"time"

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

func ExampleValueEncoder() {
Expand Down
6 changes: 3 additions & 3 deletions bson/bsoncodec/byte_slice_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"fmt"
"reflect"

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

// ByteSliceCodec is the Codec used for []byte values.
Expand Down
2 changes: 1 addition & 1 deletion bson/bsoncodec/cond_addr_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package bsoncodec
import (
"reflect"

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

// condAddrEncoder is the encoder used when a pointer to the encoding value has an encoder.
Expand Down
6 changes: 3 additions & 3 deletions bson/bsoncodec/cond_addr_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"reflect"
"testing"

"go.mongodb.org/mongo-driver/v2/bson/bsonrw"
"go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest"
"go.mongodb.org/mongo-driver/v2/internal/assert"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest"
"go.mongodb.org/mongo-driver/internal/assert"
)

func TestCondAddrCodec(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions bson/bsoncodec/default_value_decoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
"strconv"
"time"

"go.mongodb.org/mongo-driver/v2/bson/bsonrw"
"go.mongodb.org/mongo-driver/v2/bson/bsontype"
"go.mongodb.org/mongo-driver/v2/bson/primitive"
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)

var (
Expand Down
12 changes: 6 additions & 6 deletions bson/bsoncodec/default_value_decoders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"go.mongodb.org/mongo-driver/v2/bson/bsonrw"
"go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest"
"go.mongodb.org/mongo-driver/v2/bson/bsontype"
"go.mongodb.org/mongo-driver/v2/bson/primitive"
"go.mongodb.org/mongo-driver/v2/internal/assert"
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/internal/assert"
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions bson/bsoncodec/default_value_encoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
"sync"
"time"

"go.mongodb.org/mongo-driver/v2/bson/bsonrw"
"go.mongodb.org/mongo-driver/v2/bson/bsontype"
"go.mongodb.org/mongo-driver/v2/bson/primitive"
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)

var defaultValueEncoders DefaultValueEncoders
Expand Down
10 changes: 5 additions & 5 deletions bson/bsoncodec/default_value_encoders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"go.mongodb.org/mongo-driver/v2/bson/bsonrw"
"go.mongodb.org/mongo-driver/v2/bson/bsonrw/bsonrwtest"
"go.mongodb.org/mongo-driver/v2/bson/bsontype"
"go.mongodb.org/mongo-driver/v2/bson/primitive"
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/bsonrw/bsonrwtest"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)

type myInterface interface {
Expand Down
8 changes: 4 additions & 4 deletions bson/bsoncodec/empty_interface_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ package bsoncodec
import (
"reflect"

"go.mongodb.org/mongo-driver/v2/bson/bsonoptions"
"go.mongodb.org/mongo-driver/v2/bson/bsonrw"
"go.mongodb.org/mongo-driver/v2/bson/bsontype"
"go.mongodb.org/mongo-driver/v2/bson/primitive"
"go.mongodb.org/mongo-driver/bson/bsonoptions"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/bson/primitive"
)

// EmptyInterfaceCodec is the Codec used for interface{} values.
Expand Down
6 changes: 3 additions & 3 deletions bson/bsoncodec/map_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"reflect"
"strconv"

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

var defaultMapCodec = NewMapCodec()
Expand Down
4 changes: 2 additions & 2 deletions bson/bsoncodec/pointer_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package bsoncodec
import (
"reflect"

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

var _ ValueEncoder = &PointerCodec{}
Expand Down
2 changes: 1 addition & 1 deletion bson/bsoncodec/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"reflect"
"sync"

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

// ErrNilType is returned when nil is passed to either LookupEncoder or LookupDecoder.
Expand Down
Loading

0 comments on commit 1d708a6

Please sign in to comment.