-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GODRIVER-2690 Set minimum supported Go version to 1.18 in Go Driver v2.0 #1386
Changes from 6 commits
1977be6
bb13e7f
c80e788
3a05351
648b34d
72910b6
d49e8f8
300e058
40441e3
1d708a6
8dccd7d
354c56d
7b476dc
eea6b0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import ( | |
"io/ioutil" | ||
"path/filepath" | ||
|
||
"go.mongodb.org/mongo-driver/bson" | ||
"go.mongodb.org/mongo-driver/v2/bson" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm concerned that doing this package major version bump now is going to make keeping v1 and master in-sync difficult for the duration of v2 development. That may cause every v1 --> master sync to hit a merge conflict or require manual modification of the import path. Is it possible to defer making the module version change until later? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, this makes sense. I will revert those changes. |
||
) | ||
|
||
const ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ import ( | |
"context" | ||
"testing" | ||
|
||
"go.mongodb.org/mongo-driver/bson" | ||
"go.mongodb.org/mongo-driver/mongo" | ||
"go.mongodb.org/mongo-driver/mongo/options" | ||
"go.mongodb.org/mongo-driver/v2/bson" | ||
"go.mongodb.org/mongo-driver/v2/mongo" | ||
"go.mongodb.org/mongo-driver/v2/mongo/options" | ||
) | ||
|
||
var teststrings = []string{ | ||
|
@@ -41,7 +41,7 @@ func BenchmarkClientWrite(b *testing.B) { | |
if err != nil { | ||
b.Fatalf("error connecting: %v", err) | ||
} | ||
defer client.Disconnect(context.Background()) | ||
defer func() { _ = client.Disconnect(context.Background()) }() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. golangci-lint wants us to check errors. |
||
coll := client.Database("test").Collection("test") | ||
_, err = coll.DeleteMany(context.Background(), bson.D{}) | ||
if err != nil { | ||
|
@@ -85,7 +85,7 @@ func BenchmarkClientBulkWrite(b *testing.B) { | |
if err != nil { | ||
b.Fatalf("error connecting: %v", err) | ||
} | ||
defer client.Disconnect(context.Background()) | ||
defer func() { _ = client.Disconnect(context.Background()) }() | ||
coll := client.Database("test").Collection("test") | ||
_, err = coll.DeleteMany(context.Background(), bson.D{}) | ||
if err != nil { | ||
|
@@ -134,7 +134,7 @@ func BenchmarkClientRead(b *testing.B) { | |
if err != nil { | ||
b.Fatalf("error connecting: %v", err) | ||
} | ||
defer client.Disconnect(context.Background()) | ||
defer func() { _ = client.Disconnect(context.Background()) }() | ||
coll := client.Database("test").Collection("test") | ||
_, err = coll.DeleteMany(context.Background(), bson.D{}) | ||
if err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional:
go mod verify
seems to conflict with using Go workspaces in some cases (see golang/go#62663). When I run that command on my workstation, I get an error:Consider removing
go mod verify
.