File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ import (
99 "go.mongodb.org/mongo-driver/mongo/options"
1010)
1111
12- func main () {
13- // Replace the uri string with your MongoDB deployment's connection string.
14- uri := "mongodb+srv://<username>:<password>@<cluster-address>/test?w=majority"
12+ // Replace the uri string with your MongoDB deployment's connection string.
13+ const uri = "mongodb+srv://<username>:<password>@<cluster-address>/test?w=majority"
1514
15+ func main () {
1616 client , err := mongo .Connect (context .TODO (), options .Client ().ApplyURI (uri ))
1717
1818 if err != nil {
@@ -36,6 +36,6 @@ func main() {
3636 panic (err )
3737 }
3838
39- fmt .Printf ("%v documents were updated. \n " , result .ModifiedCount )
39+ fmt .Printf ("Documents updated: %v \n " , result .ModifiedCount )
4040
4141}
You can’t perform that action at this time.
0 commit comments