-
Notifications
You must be signed in to change notification settings - Fork 10
Mongo v.4 storage implementaton #50
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #50 +/- ##
========================================
+ Coverage 63.67% 64.68% +1%
========================================
Files 21 23 +2
Lines 881 1042 +161
========================================
+ Hits 561 674 +113
- Misses 277 304 +27
- Partials 43 64 +21
Continue to review full report at Codecov.
|
Добавить проверку на версию MongoDB>=4, и в документации это отразить |
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.
LGTM
|
||
import ( | ||
"context" | ||
"errors" |
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.
File is not goimports
-ed with -local github.com/qa-dev/jsonwire-grid (from goimports
)
"errors" | |
"errors" | |
"strconv" | |
"strings" | |
storage/mongo/factory.go
Outdated
return err | ||
} | ||
|
||
majorVersion, err := strconv.Atoi(strings.Split(version.StringValue(), ".")[0]) |
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.
ineffectual assignment to err
(from ineffassign
)
storage/mongo/factory.go
Outdated
func checkServerVersion(ctx context.Context, client *mongo.Client) error { | ||
serverStatus, err := client.Database("admin").RunCommand( | ||
ctx, | ||
bsonx.Doc{{"serverStatus", bsonx.Int32(1)}}, |
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.
composites: github.com/qa-dev/jsonwire-grid/vendor/go.mongodb.org/mongo-driver/x/bsonx.Elem
composite literal uses unkeyed fields (from govet
)
merge please) |
No description provided.