Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
chris124567 committed Jan 12, 2025
1 parent 9777bcb commit 8840b66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/exchangerates/coingecko.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

const (
// CoinGeckoPair is the ID of Siacoin in CoinGecko
// CoinGeckoSicaoinPair is the ID of Siacoin in CoinGecko
CoinGeckoSicaoinPair = "siacoin"
)

Expand Down Expand Up @@ -67,6 +67,7 @@ type coinGecko struct {
err error
}

// NewCoinGecko returns an ExchangeRateSource that gets data from CoinGecko.
func NewCoinGecko(apiKey string, pair string, refresh time.Duration) ExchangeRateSource {
return &coinGecko{
pair: pair,
Expand Down
3 changes: 3 additions & 0 deletions internal/exchangerates/exchangerates.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
)

// An ExchangeRateSource returns the price of 1 unit of an asset in USD.
type ExchangeRateSource interface {
Last() (float64, error)
Start(ctx context.Context)
Expand All @@ -15,6 +16,8 @@ type averager struct {
sources []ExchangeRateSource
}

// NewAverager returns an exchange rate source that averages multiple exchange
// rates.
func NewAverager(ignoreOnError bool, sources ...ExchangeRateSource) ExchangeRateSource {
return &averager{
ignoreOnError: ignoreOnError,
Expand Down
1 change: 1 addition & 0 deletions internal/exchangerates/kraken.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ type kraken struct {
err error
}

// NewKraken returns an ExchangeRateSource that gets data from Kraken.
func NewKraken(pair string, refresh time.Duration) ExchangeRateSource {
return &kraken{
pair: pair,
Expand Down

0 comments on commit 8840b66

Please sign in to comment.