Last active
November 6, 2022 21:37
-
-
Save mainawycliffe/df23f7ae32404a1ab4773caef1b5860e to your computer and use it in GitHub Desktop.
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
// we will use a service account to authenticate and authorize our app | |
clientOptions := option.WithCredentialsFile("path/to/serviceAccountKey.json") | |
app, err := firebase.NewApp(context.TODO(), nil, clientOptions) | |
if err != nil { | |
log.Fatalln(err) | |
} | |
client, err := app.Firestore(ctx) | |
if err != nil { | |
log.Fatalln(err) | |
} | |
defer client.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment