Skip to content

Commit

Permalink
fix: fmt warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianToledano committed Feb 15, 2022
1 parent f8c9c53 commit aab9b41
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Coingecko API client for golang.
| coins/{id}/history || CoinsIdHistory |
| coins/{id}/market_chart || CoinsIdMarketChart |
| coins/{id}/market_chart/range || CoinsIdMarketChartRange |
| coins/{id}/status_updates | | |
| coins/{id}/status_updates | | |
| coins/{id}/ohlc || CoinsOhlc |
| /coins/{id}/contract/{contract_address} || ContractInfo |
| /coins/{id}/contract/{contract_address}/market_chart/ || ContractMarketChart |
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func doReq(req *http.Request, client *http.Client) ([]byte, error) {
if err != nil {
return nil, err
}
if 200 != resp.StatusCode {
if http.StatusOK != resp.StatusCode {
return nil, fmt.Errorf("%s", body)
}
return body, nil
Expand Down
2 changes: 1 addition & 1 deletion global.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (c *Client) Global() (*global.Global, error) {
rUrl := fmt.Sprintf("%s", globalURL)
rUrl := globalURL
resp, err := c.MakeReq(rUrl)
if err != nil {
return nil, err
Expand Down
3 changes: 1 addition & 2 deletions trending.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ package goingecko

import (
"encoding/json"
"fmt"

"github.com/JulianToledano/goingecko/trending"
)

func (c *Client) Trending() (*trending.Trending, error) {
rUrl := fmt.Sprintf("%s", trendingURL)
rUrl := trendingURL
resp, err := c.MakeReq(rUrl)
if err != nil {
return nil, err
Expand Down

0 comments on commit aab9b41

Please sign in to comment.