diff --git a/common/common_test.go b/common/common_test.go index e3486445..e338fabc 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -404,7 +404,7 @@ func TestTrimString(t *testing.T) { } } -// ReplaceString replaces a string with another +// TestReplaceString replaces a string with another func TestReplaceString(t *testing.T) { t.Parallel() currency := "BTC-USD" diff --git a/currency/pair/pair_test.go b/currency/pair/pair_test.go index 2ae662ff..b74b65e5 100644 --- a/currency/pair/pair_test.go +++ b/currency/pair/pair_test.go @@ -202,7 +202,7 @@ func TestNewCurrencyPairDelimiter(t *testing.T) { } } -// NewCurrencyPairFromIndex returns a CurrencyPair via a currency string and +// TestNewCurrencyPairFromIndex returns a CurrencyPair via a currency string and // specific index func TestNewCurrencyPairFromIndex(t *testing.T) { t.Parallel() diff --git a/events/events.go b/events/events.go index 841c06d1..41251f71 100644 --- a/events/events.go +++ b/events/events.go @@ -126,7 +126,7 @@ func (e *Event) ExecuteAction() bool { return true } -// EventToString turns the structure event into a string +// String turns the structure event into a string func (e *Event) String() string { condition := common.SplitStrings(e.Condition, ",") return fmt.Sprintf( diff --git a/exchanges/bitflyer/bitflyer.go b/exchanges/bitflyer/bitflyer.go index e79d3dce..9d1fb1db 100644 --- a/exchanges/bitflyer/bitflyer.go +++ b/exchanges/bitflyer/bitflyer.go @@ -407,7 +407,7 @@ func (b *Bitflyer) GetFee(feeBuilder exchange.FeeBuilder) (float64, error) { return fee, nil } -// getDepositFee returns fee when performing a trade +// calculateTradingFee returns fee when performing a trade func calculateTradingFee(purchasePrice float64, amount float64) float64 { fee := 0.0015 // bitflyer has fee tiers, but does not disclose them via API, so the largest has to be assumed diff --git a/exchanges/bithumb/bithumb.go b/exchanges/bithumb/bithumb.go index f658a7d3..4d4f802f 100644 --- a/exchanges/bithumb/bithumb.go +++ b/exchanges/bithumb/bithumb.go @@ -592,7 +592,7 @@ func (b *Bithumb) GetFee(feeBuilder exchange.FeeBuilder) (float64, error) { return fee, nil } -// getDepositFee returns fee when performing a trade +// calculateTradingFee returns fee when performing a trade func calculateTradingFee(purchasePrice float64, amount float64) float64 { fee := 0.0015 diff --git a/exchanges/nonce/nonce.go b/exchanges/nonce/nonce.go index 8f87529d..74916668 100644 --- a/exchanges/nonce/nonce.go +++ b/exchanges/nonce/nonce.go @@ -45,7 +45,7 @@ func (n *Nonce) Set(val int64) { n.mtx.Unlock() } -// Returns a string version of the nonce +// String returns a string version of the nonce func (n *Nonce) String() string { n.mtx.Lock() result := strconv.FormatInt(n.n, 10) diff --git a/exchanges/yobit/yobit.go b/exchanges/yobit/yobit.go index 762b497c..3ae3ae2d 100644 --- a/exchanges/yobit/yobit.go +++ b/exchanges/yobit/yobit.go @@ -423,7 +423,7 @@ func getInternationalBankWithdrawalFee(currency string, amount float64, bankTran return fee } -// No real fees for yobit deposits, but want to be explicit on what each payment type supports +// getInternationalBankDepositFee; No real fees for yobit deposits, but want to be explicit on what each payment type supports func getInternationalBankDepositFee(currency string, amount float64, bankTransactionType exchange.InternationalBankTransactionType) float64 { var fee float64 switch bankTransactionType { diff --git a/portfolio/portfolio.go b/portfolio/portfolio.go index 84142449..c050d9c9 100644 --- a/portfolio/portfolio.go +++ b/portfolio/portfolio.go @@ -267,7 +267,7 @@ func getPercentage(input map[string]float64, target string, totals map[string]fl return percentage } -// getPercentage returns the percentage a specific value of a target coin amount +// getPercentageSpecific returns the percentage a specific value of a target coin amount // against the total coin amount. func getPercentageSpecific(input float64, target string, totals map[string]float64) float64 { total, _ := totals[target] diff --git a/tools/documentation/documentation.go b/tools/documentation/documentation.go index bbef42af..9e9dc4ba 100644 --- a/tools/documentation/documentation.go +++ b/tools/documentation/documentation.go @@ -142,7 +142,7 @@ func main() { fmt.Println("\nTool finished") } -// Iterates through codebase paths to check for readme files and either adds +// updateReadme iterates through codebase paths to check for readme files and either adds // or replaces with new readme files. func updateReadme() error { addPaths() @@ -181,7 +181,7 @@ func updateReadme() error { return nil } -// Adds paths to different potential README.md files in the codebase +// addPaths adds paths to different potential README.md files in the codebase func addPaths() { codebasePaths["common"] = fmt.Sprintf(commonPath, path, path, path) @@ -288,7 +288,7 @@ func getCapital(name string) string { return cap + last } -// returns a string for godoc package names +// getslashFromName returns a string for godoc package names func getslashFromName(packageName string) string { if strings.Contains(packageName, " ") { s := strings.Split(packageName, " ") @@ -315,7 +315,7 @@ var globS = []string{ fmt.Sprintf("web_templates%s*", common.GetOSPathSlash()), } -// adds all the template files +// addTemplates adds all the template files func addTemplates() error { tmpl = template.New("") @@ -338,7 +338,7 @@ func checkReadme(packageName string) bool { return os.IsNotExist(err) } -// replaces readme file +// replaceReadme replaces readme file func replaceReadme(packageName string) error { if packageName == licenseName || packageName == contributorName { if err := deleteFile(codebasePaths[packageName] + packageName); err != nil { @@ -352,7 +352,7 @@ func replaceReadme(packageName string) error { return createReadme(packageName) } -// creates new readme file and executes template +// createReadme creates new readme file and executes template func createReadme(packageName string) error { if packageName == licenseName || packageName == contributorName { file, err := os.Create(codebasePaths[packageName] + packageName)