Skip to content

Commit

Permalink
binance: use predecl return vars
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Feb 5, 2024
1 parent 75a2abe commit eea4c43
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/exchange/binance/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,8 @@ func parseDepthEntry(val *fastjson.Value) (*types.PriceVolume, error) {
}, nil
}

func parseDepthEvent(val *fastjson.Value) (*DepthEvent, error) {
var err error
var depth = &DepthEvent{
func parseDepthEvent(val *fastjson.Value) (depth *DepthEvent, err error) {
depth = &DepthEvent{
EventBase: EventBase{
Event: string(val.GetStringBytes("e")),
Time: types.NewMillisecondTimestampFromInt(val.GetInt64("E")),
Expand Down

0 comments on commit eea4c43

Please sign in to comment.