mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
all: reformat code
This commit is contained in:
parent
8e426ca4bf
commit
f7a5c84768
2
pkg/cache/cache.go
vendored
2
pkg/cache/cache.go
vendored
|
@ -175,4 +175,4 @@ func loadMarketsFromFile(ctx context.Context, ex types.Exchange) (markets types.
|
|||
return ex.QueryMarkets(ctx)
|
||||
})
|
||||
return markets, err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,4 +59,4 @@ func (store *MemoryStore) Reset() error {
|
|||
|
||||
delete(store.memory.Slots, store.Key)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,4 +26,4 @@ type RedisPersistenceConfig struct {
|
|||
|
||||
type JsonPersistenceConfig struct {
|
||||
Directory string `yaml:"directory" json:"directory"`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,4 +90,4 @@ func TestGrid_HasPrice_Dnum(t *testing.T) {
|
|||
assert.True(t, grid.HasPrice(number("36.666")), "found 36.666 price ok")
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,4 +90,4 @@ func TestGrid_HasPrice(t *testing.T) {
|
|||
assert.True(t, grid.HasPrice(number("36.666")), "found 36.666 price ok")
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,4 +213,4 @@ func Test_calculateArithmeticPins(t *testing.T) {
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,4 +210,4 @@ func registerMetrics() {
|
|||
metricsGridFilledOrderPrice,
|
||||
)
|
||||
metricsRegistered = true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user