all: reformat code

This commit is contained in:
c9s 2023-05-25 14:01:22 +08:00
parent 8e426ca4bf
commit f7a5c84768
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
9 changed files with 12 additions and 12 deletions

2
pkg/cache/cache.go vendored
View File

@ -175,4 +175,4 @@ func loadMarketsFromFile(ctx context.Context, ex types.Exchange) (markets types.
return ex.QueryMarkets(ctx)
})
return markets, err
}
}

View File

@ -59,4 +59,4 @@ func (store *MemoryStore) Reset() error {
delete(store.memory.Slots, store.Key)
return nil
}
}

View File

@ -26,4 +26,4 @@ type RedisPersistenceConfig struct {
type JsonPersistenceConfig struct {
Directory string `yaml:"directory" json:"directory"`
}
}

View File

@ -109,4 +109,4 @@ func (store *RedisStore) Save(val interface{}) error {
func (store *RedisStore) Reset() error {
_, err := store.redis.Del(context.Background(), store.ID).Result()
return err
}
}

View File

@ -90,4 +90,4 @@ func TestGrid_HasPrice_Dnum(t *testing.T) {
assert.True(t, grid.HasPrice(number("36.666")), "found 36.666 price ok")
})
}
}

View File

@ -90,4 +90,4 @@ func TestGrid_HasPrice(t *testing.T) {
assert.True(t, grid.HasPrice(number("36.666")), "found 36.666 price ok")
})
}
}

View File

@ -213,4 +213,4 @@ func Test_calculateArithmeticPins(t *testing.T) {
}
})
}
}
}

View File

@ -210,4 +210,4 @@ func registerMetrics() {
metricsGridFilledOrderPrice,
)
metricsRegistered = true
}
}

View File

@ -1240,7 +1240,7 @@ func Test_buildPinOrderMap(t *testing.T) {
t.Run("successful case", func(t *testing.T) {
openOrders := []types.Order{
types.Order{
{
SubmitOrder: types.SubmitOrder{
Symbol: s.Symbol,
Side: types.SideTypeBuy,
@ -1275,7 +1275,7 @@ func Test_buildPinOrderMap(t *testing.T) {
t.Run("there is one order with non-pin price in openOrders", func(t *testing.T) {
openOrders := []types.Order{
types.Order{
{
SubmitOrder: types.SubmitOrder{
Symbol: s.Symbol,
Side: types.SideTypeBuy,
@ -1301,7 +1301,7 @@ func Test_buildPinOrderMap(t *testing.T) {
t.Run("there are duplicated open orders at same pin", func(t *testing.T) {
openOrders := []types.Order{
types.Order{
{
SubmitOrder: types.SubmitOrder{
Symbol: s.Symbol,
Side: types.SideTypeBuy,
@ -1320,7 +1320,7 @@ func Test_buildPinOrderMap(t *testing.T) {
ExecutedQuantity: number(0.0),
IsWorking: false,
},
types.Order{
{
SubmitOrder: types.SubmitOrder{
Symbol: s.Symbol,
Side: types.SideTypeBuy,