Skip to content

Commit

Permalink
Merge pull request #26 from uselagoon/fix_warnings
Browse files Browse the repository at this point in the history
Resolves warnings in Mongo
  • Loading branch information
tobybellwood authored Nov 8, 2023
2 parents 0dbfc2c + 974cfa2 commit 467fc9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func mongoConnector(connectionString string, database string) string {

for _, e := range os.Environ() {
pair := strings.SplitN(e, "=", 2)
bsonData := bson.D{{"Key", pair[0]}, {"value", pair[1]}}
bsonData := bson.D{{Key: "Key", Value: pair[0]}, {Key: "value", Value: pair[1]}}
environmentVariables = append(environmentVariables, bsonData)
if err != nil {
log.Print(err)
Expand All @@ -93,7 +93,7 @@ func mongoConnector(connectionString string, database string) string {
if err != nil {
log.Print(err)
}
filter := bson.D{{"Key", primitive.Regex{Pattern: "LAGOON", Options: ""}}}
filter := bson.D{{Key: "Key", Value: primitive.Regex{Pattern: "LAGOON", Options: ""}}}
cursor, _ := envCollection.Find(context.TODO(), filter, options.Find().SetProjection(bson.M{"_id": 0}))
var docs []bson.M
if err = cursor.All(context.TODO(), &docs); err != nil {
Expand Down

0 comments on commit 467fc9f

Please sign in to comment.