clientOptions := options.Client().ApplyURI("mongodb://localhost:27017") // 
Connect to MongoDB client, err := mongo.Connect(context.TODO(), 
clientOptions) if err != nil { log.Fatal(err) } // Check the connection err 
= client.Ping(context.TODO(), nil) if err != nil { log.Fatal(err) } fmt.
Println("Connected to MongoDB!")


Error receive when i execute my program[image: Capture.JPG]

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/bfd30b79-343e-48cc-b853-1d42fe9cd825%40googlegroups.com.

Reply via email to