Skip to content

Instantly share code, notes, and snippets.

View Dineshs91's full-sized avatar
🎯
Focusing

DINESH S Dineshs91

🎯
Focusing
  • India
View GitHub Profile
dbClient := datastore.Client
database := dbClient.Database(datastore.DatabaseName)
collection := database.Collection("users")
user_count, _ := collection.FindOne(
context.Background(),
bson.D{},
)
fmt.Println("Number of users", user_count)