Update deps & use new Mongo convention

This commit is contained in:
Caleb Gardner
2023-09-17 05:55:47 -05:00
parent b530295c0b
commit 2dd5fcde4f
3 changed files with 14 additions and 58 deletions
+1 -6
View File
@@ -19,12 +19,7 @@ import (
)
func setupStupid(keyPath, mongoStr string) error {
client, err := mongo.NewClient(options.Client().ApplyURI(mongoStr))
if err != nil {
log.Println("Issues connecting to mongo:", err)
return err
}
err = client.Connect(context.TODO())
client, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(mongoStr))
if err != nil {
log.Println("Issues connecting to mongo:", err)
return err