Skip to content
Snippets Groups Projects
Commit 63ac08a9 authored by ko_oler's avatar ko_oler
Browse files

Заменен bsonx.Doc на bson.D в файле location.go

parent 7f4396c6
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@ import (
"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"
)
var locationType = &LocationType{}
......@@ -32,8 +31,8 @@ func (p LocationParameters) GetMongoIndexes(path string, f *Field) []mongo.Index
}
if f.Indexed {
add.Keys = bsonx.Doc{{Key: a, Value: bsonx.Int32(1)}}
geo.Keys = bsonx.Doc{{Key: g, Value: bsonx.String("2dsphere")}}
add.Keys = bson.D{{Key: a, Value: 1}}
geo.Keys = bson.D{{Key: g, Value: "2dsphere"}}
}
return []mongo.IndexModel{add, geo}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment