Skip to content

Commit d267a33

Browse files
committed
go fmt code
1 parent 1bd00d5 commit d267a33

File tree

17 files changed

+21
-50
lines changed

17 files changed

+21
-50
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,3 @@ updates:
77
time: "21:00"
88
timezone: Asia/Shanghai
99
open-pull-requests-limit: 10
10-
ignore:
11-
- dependency-name: github.com/sirupsen/logrus
12-
versions:
13-
- 1.7.0
14-
- 1.7.1
15-
- 1.8.0
16-
- dependency-name: github.com/tidwall/gjson
17-
versions:
18-
- 1.6.7

config/model.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ type Config struct {
3030
Queries []*PriceQuery `mapstructure:"exchanges"`
3131
}
3232

33-
func (c *Config) GroupQueryByExchange() map[string]PriceQuery {
34-
exchangeMap := make(map[string]PriceQuery, len(c.Queries))
33+
func (c *Config) GroupQueryByExchange() map[string]*PriceQuery {
34+
exchangeMap := make(map[string]*PriceQuery, len(c.Queries))
3535
for _, query := range c.Queries {
36-
exchangeMap[strings.ToUpper(query.Name)] = *query
36+
exchangeMap[strings.ToUpper(query.Name)] = query
3737
}
3838
return exchangeMap
3939
}

exchange/bigone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type bigOneMarketResponse struct {
4848
}
4949
}
5050

51-
func NewBigOneClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
51+
func NewBigOneClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
5252
return &bigOneClient{Client: httpClient}
5353
}
5454

exchange/binance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type binance24hStatistics struct {
4343
CloseTime int64
4444
}
4545

46-
func NewBinanceClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
46+
func NewBinanceClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
4747
return &binanceClient{Client: httpClient}
4848
}
4949

exchange/bitfinex.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type bitfinixClient struct {
2121
*http.Client
2222
}
2323

24-
func NewBitfinixClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
24+
func NewBitfinixClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
2525
return &bitfinixClient{Client: httpClient}
2626
}
2727

exchange/bittrex.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type bittrexClient struct {
2525
*http.Client
2626
}
2727

28-
func NewBittrexClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
28+
func NewBittrexClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
2929
return &bittrexClient{Client: httpClient}
3030
}
3131

exchange/coinbase.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type coinbaseClient struct {
1717
coinbasepro *coinbasepro.Client
1818
}
1919

20-
func NewCoinBaseClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
20+
func NewCoinBaseClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
2121
client := coinbasepro.NewClient()
2222
client.HTTPClient = httpClient.StdClient
2323
return &coinbaseClient{coinbasepro: client}

exchange/coinmarketcap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ type coinMarketCapClient struct {
7070
// }
7171
// }
7272

73-
func NewCoinMarketCapClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
73+
func NewCoinMarketCapClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
7474
c := &coinMarketCapClient{Client: httpClient}
7575
if query, ok := queries[strings.ToUpper(c.GetName())]; ok { // If user queries CoinMarketCap, then API key is required
7676
c.APIKey = query.APIKey

exchange/gate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type gateCommonResponseProvider interface {
4949
getCommonResponse() gateCommonResponse
5050
}
5151

52-
func NewGateClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
52+
func NewGateClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
5353
return &gateClient{Client: httpClient}
5454
}
5555

exchange/hitbtc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type hitBtcCommonResponseProvider interface {
5656
getCommonResponse() hitBtcCommonResponse
5757
}
5858

59-
func NewHitBtcClient(queries map[string]config.PriceQuery, httpClient *http.Client) ExchangeClient {
59+
func NewHitBtcClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient {
6060
return &hitBtcClient{Client: httpClient}
6161
}
6262

0 commit comments

Comments
 (0)