From 956d38be5ed49ac97bfc14b230e1d94ae3c239fd Mon Sep 17 00:00:00 2001 From: threehonor Date: Fri, 28 Mar 2025 11:03:31 +0800 Subject: [PATCH] chore: fix some function names in comments (#1862) Signed-off-by: threehonor --- cmd/apichecker/apicheck.go | 2 +- common/cache/lru.go | 2 +- currency/manager_test.go | 2 +- currency/pair_methods.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/apichecker/apicheck.go b/cmd/apichecker/apicheck.go index 11f9b907..36676437 100644 --- a/cmd/apichecker/apicheck.go +++ b/cmd/apichecker/apicheck.go @@ -1234,7 +1234,7 @@ func trelloGetLists() ([]TrelloData, error) { return resp, sendGetReq(fmt.Sprintf(pathGetAllLists, trelloBoardID, apiKey, apiToken), &resp) } -// trelloNewList creates a new list on a specified boards on trello +// trelloCreateNewList creates a new list on a specified boards on trello func trelloCreateNewList() error { if trelloBoardID == "" { return errors.New("trelloBoardID not set, cannot create a new list") diff --git a/common/cache/lru.go b/common/cache/lru.go index 173dc0f6..3c3f74c2 100644 --- a/common/cache/lru.go +++ b/common/cache/lru.go @@ -97,7 +97,7 @@ func (l *LRU) Len() uint64 { return uint64(l.l.Len()) //nolint:gosec // False positive as uint64 (2^64-1) can support both 2^31-1 on 32bit systems and 2^63-1 on 64bit systems } -// removeOldest removes the oldest item from the cache. +// removeOldestEntry removes the oldest item from the cache. func (l *LRU) removeOldestEntry() { if i := l.l.Back(); i != nil { l.removeElement(i) diff --git a/currency/manager_test.go b/currency/manager_test.go index 0322d23c..55706d6f 100644 --- a/currency/manager_test.go +++ b/currency/manager_test.go @@ -770,7 +770,7 @@ func checkPairDelimiter(tb testing.TB, p *PairsManager, err error, d, msg string } } -// TestPairManagerUnmarshal tests behaviour expectations: +// TestPairManagerSetDelimitersFromConfig tests behaviour expectations: // * Should error with no ConfigFormat ( `CheckPairConsistency` catches that ) // * Asset pair config should take precedent // * Global store pair config should apply when no Asset pair config diff --git a/currency/pair_methods.go b/currency/pair_methods.go index 9c045515..a8a3a6f0 100644 --- a/currency/pair_methods.go +++ b/currency/pair_methods.go @@ -194,7 +194,7 @@ func (p Pair) LimitBuyOrderParameters(wantingToBuy Code) (*OrderParameters, erro return p.getOrderParameters(wantingToBuy, false, false) } -// getOrderDecisionDetails returns order parameters for the currency pair using +// getOrderParameters returns order parameters for the currency pair using // the provided currency code, whether or not you are selling and whether or not // you are placing a market order. func (p Pair) getOrderParameters(c Code, selling, market bool) (*OrderParameters, error) {