From 6243e33fbc90c53a2b72c9915561cddcf6d78d1c Mon Sep 17 00:00:00 2001 From: Ankit Date: Sun, 29 Sep 2024 08:33:16 +0530 Subject: [PATCH] Updates example for GetAccessToken context (#310) GetAccessToken requires a context along with shopname and code --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e76f297f..67f904b2 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,8 @@ func MyCallbackHandler(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() shopName := query.Get("shop") code := query.Get("code") - token, err := app.GetAccessToken(shopName, code) + ctx := context.TODO() // adds context which will be used in GetAccessToken below + token, err := app.GetAccessToken(ctx, shopName, code) // Do something with the token, like store it in a DB. }