mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 23:16:54 +00:00
Replace a zero-length, non-nil slice with a nil slice (#299)
* Replace a zero-length, non-nil slice with a nil slice * Update codelingo.yaml
This commit is contained in:
committed by
Adrian Gallagher
parent
07216a4422
commit
cdab89a58a
@@ -292,7 +292,7 @@ func (g *Gateio) GetSpotKline(arg KlinesRequestParams) ([]*KLineResponse, error)
|
||||
}
|
||||
|
||||
rawKlineDatasString, _ := json.Marshal(rawKlines["data"].([]interface{}))
|
||||
rawKlineDatas := [][]interface{}{}
|
||||
var rawKlineDatas [][]interface{}
|
||||
if err := json.Unmarshal(rawKlineDatasString, &rawKlineDatas); err != nil {
|
||||
return nil, fmt.Errorf("rawKlines unmarshal failed. Err: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user