Skip to content

Commit

Permalink
Fix misspells
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- committed Oct 4, 2017
1 parent 61023f9 commit 55c8b02
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 39 deletions.
10 changes: 5 additions & 5 deletions currency/currency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,26 +409,26 @@ func TestConvertCurrency(t *testing.T) {
t.Errorf("Test failed. ConvertCurrency USD -> AUD. Error %s", err)
}

// Test non-existant currencies
// Test non-existent currencies

_, err = ConvertCurrency(1000, "ASDF", "USD")
if err == nil {
t.Errorf("Test failed. ConvertCurrency non-existant currency -> USD. Error %s", err)
t.Errorf("Test failed. ConvertCurrency non-existent currency -> USD. Error %s", err)
}

_, err = ConvertCurrency(1000, "USD", "ASDF")
if err == nil {
t.Errorf("Test failed. ConvertCurrency USD -> non-existant currency. Error %s", err)
t.Errorf("Test failed. ConvertCurrency USD -> non-existent currency. Error %s", err)
}

_, err = ConvertCurrency(1000, "CNY", "UAHF")
if err == nil {
t.Errorf("Test failed. ConvertCurrency non-USD currency CNY -> non-existant currency. Error %s", err)
t.Errorf("Test failed. ConvertCurrency non-USD currency CNY -> non-existent currency. Error %s", err)
}

_, err = ConvertCurrency(1000, "UASF", "UAHF")
if err == nil {
t.Errorf("Test failed. ConvertCurrency non-existant currency -> non-existant currency. Error %s", err)
t.Errorf("Test failed. ConvertCurrency non-existent currency -> non-existent currency. Error %s", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion currency/symbol/symbol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestGetSymbolByCurrencyName(t *testing.T) {

_, err = GetSymbolByCurrencyName("BLAH")
if err == nil {
t.Errorf("Test failed. TestGetSymbolByCurrencyNam returned nil on non-existant currency")
t.Errorf("Test failed. TestGetSymbolByCurrencyNam returned nil on non-existent currency")
}

}
2 changes: 1 addition & 1 deletion exchanges/alphapoint/alphapoint_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Trades struct {
Trades []Trade `json:"trades"`
}

// Trade is a sub-type which holds the singular trade that occured in the past
// Trade is a sub-type which holds the singular trade that occurred in the past
type Trade struct {
TID int64 `json:"tid"`
Price float64 `json:"px"`
Expand Down
4 changes: 2 additions & 2 deletions exchanges/bitfinex/bitfinex.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (b *Bitfinex) GetLends(symbol string, values url.Values) ([]Lends, error) {
return response, common.SendHTTPGetRequest(path, true, b.Verbose, &response)
}

// GetSymbols returns the avaliable currency pairs on the exchange
// GetSymbols returns the available currency pairs on the exchange
func (b *Bitfinex) GetSymbols() ([]string, error) {
products := []string{}
path := fmt.Sprint(bitfinexAPIURL + bitfinexSymbols)
Expand Down Expand Up @@ -444,7 +444,7 @@ func (b *Bitfinex) GetBalanceHistory(symbol string, timeSince, timeUntil time.Ti
b.SendAuthenticatedHTTPRequest("POST", bitfinexHistory, request, &response)
}

// GetMovementHistory returns an array of past deposits and withdrawels
// GetMovementHistory returns an array of past deposits and withdrawals
func (b *Bitfinex) GetMovementHistory(symbol, method string, timeSince, timeUntil time.Time, limit int) ([]MovementHistory, error) {
response := []MovementHistory{}
request := make(map[string]interface{})
Expand Down
8 changes: 4 additions & 4 deletions exchanges/bitfinex/bitfinex_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type TradeStructure struct {
Type string `json:"sell"`
}

// Lendbook holds most recent funding data for a relevent currency
// Lendbook holds most recent funding data for a relevant currency
type Lendbook struct {
Bids []Book `json:"bids"`
Asks []Book `json:"asks"`
Expand Down Expand Up @@ -86,7 +86,7 @@ type AccountInfo struct {
} `json:"fees"`
}

// AccountFees stores withdrawel account fee data from Bitfinex
// AccountFees stores withdrawal account fee data from Bitfinex
type AccountFees struct {
Withdraw struct {
BTC float64 `json:"BTC,string"`
Expand Down Expand Up @@ -186,7 +186,7 @@ type WalletTransfer struct {
Message string `json:"message"`
}

// Withdrawal holds withdrawel status information
// Withdrawal holds withdrawal status information
type Withdrawal struct {
Status string `json:"status"`
Message string `json:"message"`
Expand Down Expand Up @@ -300,7 +300,7 @@ type Offer struct {
ExecutedAmount float64 `json:"executed_amount,string"`
}

// MarginFunds holds active funding information used in a margin positon
// MarginFunds holds active funding information used in a margin position
type MarginFunds struct {
ID int64 `json:"id"`
PositionID int64 `json:"position_id"`
Expand Down
2 changes: 1 addition & 1 deletion exchanges/bitstamp/bitstamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (b *Bitstamp) PlaceOrder(currencyPair string, price float64, amount float64
b.SendAuthenticatedHTTPRequest(path, true, req, &response)
}

// GetWithdrawalRequests returns withdrawl requests for the account
// GetWithdrawalRequests returns withdrawal requests for the account
// timedelta - positive integer with max value 50000000 which returns requests
// from number of seconds ago to now.
func (b *Bitstamp) GetWithdrawalRequests(timedelta int64) ([]WithdrawalRequests, error) {
Expand Down
2 changes: 1 addition & 1 deletion exchanges/btcmarkets/btcmarkets.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (b *BTCMarkets) SetDefaults() {
b.AssetTypes = []string{ticker.Spot}
}

// Setup takes in an exchange configuration and sets all paramaters
// Setup takes in an exchange configuration and sets all parameters
func (b *BTCMarkets) Setup(exch config.ExchangeConfig) {
if !exch.Enabled {
b.SetEnabled(false)
Expand Down
2 changes: 1 addition & 1 deletion exchanges/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
const (
warningBase64DecryptSecretKeyFailed = "WARNING -- Exchange %s unable to base64 decode secret key.. Disabling Authenticated API support."

// WarningAuthenticatedRequestWithoutCredentialsSet error message for authenticated request without credentails set
// WarningAuthenticatedRequestWithoutCredentialsSet error message for authenticated request without credentials set
WarningAuthenticatedRequestWithoutCredentialsSet = "WARNING -- Exchange %s authenticated HTTP request called but not supported due to unset/default API keys."
// ErrExchangeNotFound is a constant for an error message
ErrExchangeNotFound = "Exchange not found in dataset."
Expand Down
12 changes: 6 additions & 6 deletions exchanges/exchange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestSetAssetTypes(t *testing.T) {

err = b.SetAssetTypes()
if err == nil {
t.Fatal("Test failed. TestSetAssetTypes returned nil error for a non-existant exchange")
t.Fatal("Test failed. TestSetAssetTypes returned nil error for a non-existent exchange")
}

b.Name = "ANX"
Expand Down Expand Up @@ -77,9 +77,9 @@ func TestGetExchangeAssetTypes(t *testing.T) {
t.Fatal("Test failed. Bitfinex does not contain default asset type 'SPOT'")
}

_, err = GetExchangeAssetTypes("non-existant-exchange")
_, err = GetExchangeAssetTypes("non-existent-exchange")
if err == nil {
t.Fatal("Test failed. Got asset types for non-existant exchange")
t.Fatal("Test failed. Got asset types for non-existent exchange")
}
}

Expand All @@ -96,7 +96,7 @@ func TestSetCurrencyPairFormat(t *testing.T) {

err = b.SetCurrencyPairFormat()
if err == nil {
t.Fatal("Test failed. TestSetCurrencyPairFormat returned nil error for a non-existant exchange")
t.Fatal("Test failed. TestSetCurrencyPairFormat returned nil error for a non-existent exchange")
}

b.Name = "ANX"
Expand Down Expand Up @@ -349,9 +349,9 @@ func TestGetAndFormatExchangeCurrencies(t *testing.T) {
actual, expected)
}

_, err = GetAndFormatExchangeCurrencies("non-existant", pairs)
_, err = GetAndFormatExchangeCurrencies("non-existent", pairs)
if err == nil {
t.Errorf("Test failed - Exchange TestGetAndFormatExchangeCurrencies returned nil error on non-existant exchange")
t.Errorf("Test failed - Exchange TestGetAndFormatExchangeCurrencies returned nil error on non-existent exchange")
}
}

Expand Down
6 changes: 3 additions & 3 deletions exchanges/gdax/gdax.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (g *GDAX) SetDefaults() {
g.AssetTypes = []string{ticker.Spot}
}

// Setup initialises the exchange paramaters with the current configuration
// Setup initialises the exchange parameters with the current configuration
func (g *GDAX) Setup(exch config.ExchangeConfig) {
if !exch.Enabled {
g.SetEnabled(false)
Expand Down Expand Up @@ -514,7 +514,7 @@ func (g *GDAX) GetFills(orderID, currencyPair string) ([]FillResponse, error) {
params.Set("product_id", currencyPair)
}
if len(params.Get("order_id")) == 0 && len(params.Get("product_id")) == 0 {
return resp, errors.New("no paramaters set")
return resp, errors.New("no parameters set")
}

path := common.EncodeURLValues(gdaxAPIURL+gdaxFills, params)
Expand Down Expand Up @@ -708,7 +708,7 @@ func (g *GDAX) GetCoinbaseAccounts() ([]CoinbaseAccounts, error) {
// E.g. BTC-USD. *Required* if type is fills
// accountID - ID of the account to generate an account report for. *Required*
// if type is account
// format - pdf or csv (defualt is pdf)
// format - pdf or csv (default is pdf)
// email - [optional] Email address to send the report to
func (g *GDAX) GetReport(reportType, startDate, endDate, currencyPair, accountID, format, email string) (Report, error) {
resp := Report{}
Expand Down
8 changes: 4 additions & 4 deletions exchanges/gemini/gemini.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (g *Gemini) SetDefaults() {
g.AssetTypes = []string{ticker.Spot}
}

// Setup sets exchange configuration paramaters
// Setup sets exchange configuration parameters
func (g *Gemini) Setup(exch config.ExchangeConfig) {
if !exch.Enabled {
g.SetEnabled(false)
Expand Down Expand Up @@ -204,7 +204,7 @@ func (g *Gemini) GetTrades(currencyPair string, params url.Values) ([]Trade, err
return trades, common.SendHTTPGetRequest(path, true, g.Verbose, &trades)
}

// GetAuction returns auction infomation
// GetAuction returns auction information
func (g *Gemini) GetAuction(currencyPair string) (Auction, error) {
path := fmt.Sprintf("%s/v%s/%s/%s", geminiAPIURL, geminiAPIVersion, geminiAuction, currencyPair)
auction := Auction{}
Expand Down Expand Up @@ -348,8 +348,8 @@ func (g *Gemini) GetDepositAddress(depositAddlabel, currency string) (DepositAdd
}

// WithdrawCrypto withdraws crypto currency to a whitelisted address
func (g *Gemini) WithdrawCrypto(address, currency string, amount float64) (WithdrawelAddress, error) {
response := WithdrawelAddress{}
func (g *Gemini) WithdrawCrypto(address, currency string, amount float64) (WithdrawalAddress, error) {
response := WithdrawalAddress{}
request := make(map[string]interface{})
request["address"] = address
request["amount"] = strconv.FormatFloat(amount, 'f', -1, 64)
Expand Down
4 changes: 2 additions & 2 deletions exchanges/gemini/gemini_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ type DepositAddress struct {
Label string `json:"label"`
}

// WithdrawelAddress holds withdrawel information
type WithdrawelAddress struct {
// WithdrawalAddress holds withdrawal information
type WithdrawalAddress struct {
Address string `json:"address"`
Amount float64 `json:"amount"`
TXHash string `json:"txHash"`
Expand Down
2 changes: 1 addition & 1 deletion exchanges/itbit/itbit.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (i *ItBit) SetDefaults() {
i.AssetTypes = []string{ticker.Spot}
}

// Setup sets the exchange paramaters from exchange config
// Setup sets the exchange parameters from exchange config
func (i *ItBit) Setup(exch config.ExchangeConfig) {
if !exch.Enabled {
i.SetEnabled(false)
Expand Down
8 changes: 4 additions & 4 deletions exchanges/orderbook/orderbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ func TestGetOrderbook(t *testing.T) {
t.Fatal("Test failed. TestGetOrderbook failed. Mismatched pairs")
}

_, err = GetOrderbook("nonexistant", currency, Spot)
_, err = GetOrderbook("nonexistent", currency, Spot)
if err == nil {
t.Fatal("Test failed. TestGetOrderbook retrieved non-existant orderbook")
t.Fatal("Test failed. TestGetOrderbook retrieved non-existent orderbook")
}

currency.FirstCurrency = "blah"
_, err = GetOrderbook("Exchange", currency, Spot)
if err == nil {
t.Fatal("Test failed. TestGetOrderbook retrieved non-existant orderbook using invalid first currency")
t.Fatal("Test failed. TestGetOrderbook retrieved non-existent orderbook using invalid first currency")
}

newCurrency := pair.NewCurrencyPair("BTC", "AUD")
_, err = GetOrderbook("Exchange", newCurrency, Spot)
if err == nil {
t.Fatal("Test failed. TestGetOrderbook retrieved non-existant orderbook using invalid second currency")
t.Fatal("Test failed. TestGetOrderbook retrieved non-existent orderbook using invalid second currency")
}
}

Expand Down
2 changes: 1 addition & 1 deletion smsglobal/smsglobal.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Base struct {
SendFrom string `json:"send_from"`
}

// New initalises the SMSGlobal var
// New initialises the SMSGlobal var
func New(username, password, sendFrom string, contacts []Contact) *Base {
if username == "" || password == "" || sendFrom == "" || len(contacts) == 0 {
return nil
Expand Down
4 changes: 2 additions & 2 deletions smsglobal/smsglobal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestGetContactByNumber(t *testing.T) {

_, err = result.GetContactByNumber("ASDASDASD")
if err == nil {
t.Fatal("Test failed. TestGetContactByNumber: Returned nil err on non-existant number")
t.Fatal("Test failed. TestGetContactByNumber: Returned nil err on non-existent number")
}
}

Expand All @@ -73,7 +73,7 @@ func TestGetContactByName(t *testing.T) {

_, err = result.GetContactByName("ASDASDASD")
if err == nil {
t.Fatal("Test failed. TestGetContactByName: Returned nil err on non-existant number")
t.Fatal("Test failed. TestGetContactByName: Returned nil err on non-existent number")
}
}

Expand Down

0 comments on commit 55c8b02

Please sign in to comment.