Skip to content

Commit 8a31a1a

Browse files
committed
refine code example feedback
1 parent 82f6a8a commit 8a31a1a

File tree

1 file changed

+4
-4
lines changed
  • source/includes/usage-examples/code-snippets

1 file changed

+4
-4
lines changed

source/includes/usage-examples/code-snippets/bulk.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ func main() {
4747

4848
// Creates write models that specify replace and update operations
4949
models := []mongo.WriteModel{
50-
mongo.NewReplaceOneModel().SetFilter(bson.D{{"name", "Cafe Tomato"}}).
51-
SetReplacement(Restaurant{Name: "Cafe Zucchini", Cuisine: "French"}),
52-
mongo.NewUpdateOneModel().SetFilter(bson.D{{"name", "Cafe Zucchini"}}).
53-
SetUpdate(bson.D{{"$set", bson.D{{"name", "Zucchini Land"}}}}),
50+
mongo.NewReplaceOneModel().SetFilter(bson.D{{"name", "Towne Cafe"}}).
51+
SetReplacement(Restaurant{Name: "New Towne Cafe"}),
52+
mongo.NewUpdateOneModel().SetFilter(bson.D{{"name", "New Towne Cafe"}}).
53+
SetUpdate(bson.D{{"$set", bson.D{{"cuisine", "French"}}}}),
5454
}
5555

5656
// Specifies that the bulk write is ordered

0 commit comments

Comments
 (0)