Skip to content

Instantly share code, notes, and snippets.

@nidhi-canopas
Last active October 12, 2022 06:56
Show Gist options
  • Save nidhi-canopas/2cafb3f68e7eb17d7d1a6b4951491231 to your computer and use it in GitHub Desktop.
Save nidhi-canopas/2cafb3f68e7eb17d7d1a6b4951491231 to your computer and use it in GitHub Desktop.
// create ref at path user_scores/:userId
ref := client.NewRef("user_scores/" + fmt.Sprint(1))
if err := ref.Set(context.TODO(), map[string]interface{}{"score": 40}); err != nil {
log.Fatal(err)
}
fmt.Println("score added/updated successfully!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment