Skip to content

Commit ed99672

Browse files
committed
1.14 Code Fixes (#353)
(cherry picked from commit f1993ed)
1 parent 8c78f60 commit ed99672

File tree

5 files changed

+1
-5
lines changed

5 files changed

+1
-5
lines changed

source/includes/fundamentals/code-snippets/CRUD/changeStream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func main() {
2626
log.Fatal("You must set your 'MONGODB_URI' environment variable. See\n\t https://www.mongodb.com/docs/drivers/go/current/usage-examples/#environment-variable")
2727
}
2828

29-
client, err := mongo.Connect(options.Client().ApplyURI(uri))
29+
client, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri))
3030

3131
if err != nil {
3232
panic(err)

source/includes/fundamentals/code-snippets/CRUD/limit.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33

44
import (
55
"context"
6-
"encoding/json"
76
"fmt"
87
"log"
98
"os"

source/includes/fundamentals/code-snippets/CRUD/query.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33

44
import (
55
"context"
6-
"encoding/json"
76
"fmt"
87
"log"
98
"os"

source/includes/fundamentals/code-snippets/CRUD/skip.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ package main
44

55
import (
66
"context"
7-
"encoding/json"
87
"fmt"
98
"log"
109
"os"

source/includes/fundamentals/code-snippets/CRUD/sort.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ package main
44

55
import (
66
"context"
7-
"encoding/json"
87
"fmt"
98
"log"
109
"os"

0 commit comments

Comments
 (0)