From 33297c7be41f4788ed6158f030b8d2f5f2cfd475 Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Sun, 15 Sep 2019 00:12:26 -0700 Subject: [PATCH] Return missing error --- cointop/api/coingecko/v3/v3.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cointop/api/coingecko/v3/v3.go b/cointop/api/coingecko/v3/v3.go index cf0a261..59378a3 100644 --- a/cointop/api/coingecko/v3/v3.go +++ b/cointop/api/coingecko/v3/v3.go @@ -125,7 +125,11 @@ func (c *Client) SimpleSupportedVSCurrencies() (*types.SimpleSupportedVSCurrenci } var data *types.SimpleSupportedVSCurrencies err = json.Unmarshal(resp, &data) - return data, err + if err != nil { + return nil, err + } + + return data, nil } // CoinsList /coins/list