From b73dbee7e68b9dd0d697d5f55b6bce211d7afde7 Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Tue, 14 Jun 2022 19:49:17 +0800 Subject: [PATCH] chore: don't export func `GetAccountsByPath` --- internal/operations/account.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/operations/account.go b/internal/operations/account.go index ae60183a..53302b97 100644 --- a/internal/operations/account.go +++ b/internal/operations/account.go @@ -102,7 +102,7 @@ func SaveDriverAccount(driver driver.Driver) error { // GetAccountsByPath get account by longest match path, contains balance account. // for example, there is /a/b,/a/c,/a/d/e,/a/d/e.balance // GetAccountsByPath(/a/d/e/f) => /a/d/e,/a/d/e.balance -func GetAccountsByPath(path string) []driver.Driver { +func getAccountsByPath(path string) []driver.Driver { accounts := make([]driver.Driver, 0) curSlashCount := 0 accountsMap.Range(func(key string, value driver.Driver) bool { @@ -179,7 +179,7 @@ var balanceMap generic_sync.MapOf[string, int] // GetBalancedAccount get account by path func GetBalancedAccount(path string) driver.Driver { path = utils.StandardizationPath(path) - accounts := GetAccountsByPath(path) + accounts := getAccountsByPath(path) accountNum := len(accounts) switch accountNum { case 0: