Created
April 21, 2019 16:59
-
-
Save Dineshs91/48cbb93b32b79ed53ab71a9ece834937 to your computer and use it in GitHub Desktop.
Aggregates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment