From ef30f40d42fcc30948c4b5afb9a0a90f893ee5d9 Mon Sep 17 00:00:00 2001 From: Alexandre Bourget Date: Thu, 27 Feb 2020 08:45:12 -0500 Subject: [PATCH] BREAKING CHANGE: all API calls now require a `context.Context` as a first parameter, to allow for cancellation to propagate to long calls (or stalling calls on nodes that are overloaded). Just add a `ctx` that's hanging around, or use `context.Background()` when you don't care. --- README-cn.md | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README-cn.md b/README-cn.md index a9f3bb84..88bb465a 100644 --- a/README-cn.md +++ b/README-cn.md @@ -21,8 +21,8 @@ https://github.com/eoscanada/eos-bios ```go api := eos.New("http://testnet1.eos.io") -infoResp, _ := api.GetInfo() -accountResp, _ := api.GetAccount("initn") +infoResp, _ := api.GetInfo(ctx) +accountResp, _ := api.GetAccount(ctx, "initn") fmt.Println("Permission for initn:", accountResp.Permissions[0].RequiredAuth.Keys) ``` diff --git a/README.md b/README.md index 3d885f74..d9124cbf 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ Basic usage ```go api := eos.New("http://testnet1.eos.io") -infoResp, _ := api.GetInfo() -accountResp, _ := api.GetAccount("initn") +infoResp, _ := api.GetInfo(ctx) +accountResp, _ := api.GetAccount(ctx, "initn") fmt.Println("Permission for initn:", accountResp.Permissions[0].RequiredAuth.Keys) ```