From 412d0e0558992d434fd438a2e40b60c642d9ee0a Mon Sep 17 00:00:00 2001 From: Edwin Date: Fri, 1 Sep 2023 17:51:09 +0800 Subject: [PATCH] *: fix lint --- pkg/cache/cache_test.go | 2 +- pkg/exchange/bybit/types_test.go | 2 +- pkg/migrations/mysql/migration_api_test.go | 4 ++-- pkg/migrations/sqlite3/migration_api_test.go | 4 ++-- pkg/strategy/tri/strategy.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/cache/cache_test.go b/pkg/cache/cache_test.go index 8e9c6db36..49ee23ab4 100644 --- a/pkg/cache/cache_test.go +++ b/pkg/cache/cache_test.go @@ -100,4 +100,4 @@ func Test_loadMarketsFromMem(t *testing.T) { } globalMarketMemCache = newMarketMemCache() // reset the global cache -} \ No newline at end of file +} diff --git a/pkg/exchange/bybit/types_test.go b/pkg/exchange/bybit/types_test.go index d3ae97643..3601690fb 100644 --- a/pkg/exchange/bybit/types_test.go +++ b/pkg/exchange/bybit/types_test.go @@ -524,7 +524,7 @@ func TestTradeEvent_toGlobalTrade(t *testing.T) { OrderId: fmt.Sprintf("%d", expTrade.OrderID), OrderLinkId: "1691419101980", Category: "spot", - Symbol: fmt.Sprintf("%s", expTrade.Symbol), + Symbol: expTrade.Symbol, ExecId: fmt.Sprintf("%d", expTrade.ID), ExecPrice: expTrade.Price, ExecQty: expTrade.Quantity, diff --git a/pkg/migrations/mysql/migration_api_test.go b/pkg/migrations/mysql/migration_api_test.go index 2684076d3..9864095ce 100644 --- a/pkg/migrations/mysql/migration_api_test.go +++ b/pkg/migrations/mysql/migration_api_test.go @@ -14,7 +14,7 @@ func TestGetMigrationsMap(t *testing.T) { func TestMergeMigrationsMap(t *testing.T) { MergeMigrationsMap(map[int64]*rockhopper.Migration{ - 2: &rockhopper.Migration{}, - 3: &rockhopper.Migration{}, + 2: {}, + 3: {}, }) } diff --git a/pkg/migrations/sqlite3/migration_api_test.go b/pkg/migrations/sqlite3/migration_api_test.go index d1f4fe1ab..d7f77c875 100644 --- a/pkg/migrations/sqlite3/migration_api_test.go +++ b/pkg/migrations/sqlite3/migration_api_test.go @@ -14,7 +14,7 @@ func TestGetMigrationsMap(t *testing.T) { func TestMergeMigrationsMap(t *testing.T) { MergeMigrationsMap(map[int64]*rockhopper.Migration{ - 2: &rockhopper.Migration{}, - 3: &rockhopper.Migration{}, + 2: {}, + 3: {}, }) } diff --git a/pkg/strategy/tri/strategy.go b/pkg/strategy/tri/strategy.go index ec8b13e7f..c96336106 100644 --- a/pkg/strategy/tri/strategy.go +++ b/pkg/strategy/tri/strategy.go @@ -484,7 +484,7 @@ func (s *Strategy) executePath(ctx context.Context, session *bbgo.ExchangeSessio } func notifyUsdPnL(profit fixedpoint.Value) { - var title = fmt.Sprintf("Triangular Sum PnL ~= ") + var title = "Triangular Sum PnL ~= " title += style.PnLEmojiSimple(profit) + " " title += style.PnLSignString(profit) + " USD" bbgo.Notify(title)