mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
use &PublicDataService{} to create it as a pointer object and rename ser to srv
This commit is contained in:
parent
cba5663fac
commit
b0ccc7e51b
|
@ -31,8 +31,8 @@ func TestClient_GetInstrumentsRequest(t *testing.T) {
|
||||||
client := NewClient()
|
client := NewClient()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
ser := PublicDataService{client: client}
|
srv := &PublicDataService{client: client}
|
||||||
req := ser.NewGetInstrumentsRequest()
|
req := srv.NewGetInstrumentsRequest()
|
||||||
|
|
||||||
instruments, err := req.
|
instruments, err := req.
|
||||||
InstrumentType(InstrumentTypeSpot).
|
InstrumentType(InstrumentTypeSpot).
|
||||||
|
@ -45,8 +45,8 @@ func TestClient_GetInstrumentsRequest(t *testing.T) {
|
||||||
func TestClient_GetFundingRateRequest(t *testing.T) {
|
func TestClient_GetFundingRateRequest(t *testing.T) {
|
||||||
client := NewClient()
|
client := NewClient()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
ser := PublicDataService{client: client}
|
srv := &PublicDataService{client: client}
|
||||||
req := ser.NewGetFundingRate()
|
req := srv.NewGetFundingRate()
|
||||||
|
|
||||||
instrument, err := req.
|
instrument, err := req.
|
||||||
InstrumentID("BTC-USDT-SWAP").
|
InstrumentID("BTC-USDT-SWAP").
|
||||||
|
@ -59,8 +59,8 @@ func TestClient_GetFundingRateRequest(t *testing.T) {
|
||||||
func TestClient_PlaceOrderRequest(t *testing.T) {
|
func TestClient_PlaceOrderRequest(t *testing.T) {
|
||||||
client := getTestClientOrSkip(t)
|
client := getTestClientOrSkip(t)
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
ser := TradeService{client: client}
|
srv := &TradeService{client: client}
|
||||||
req := ser.NewPlaceOrderRequest()
|
req := srv.NewPlaceOrderRequest()
|
||||||
|
|
||||||
order, err := req.
|
order, err := req.
|
||||||
InstrumentID("XTZ-BTC").
|
InstrumentID("XTZ-BTC").
|
||||||
|
|
Loading…
Reference in New Issue
Block a user