mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
fix address UnmarshalJSON
This commit is contained in:
parent
967c7e9f9d
commit
9d7f147fbf
|
@ -128,14 +128,8 @@ func (a *Address) UnmarshalJSON(body []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
var newA Address
|
||||
err = json.Unmarshal(body, &newA)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*a = newA
|
||||
return nil
|
||||
type addressTemplate Address
|
||||
return json.Unmarshal(body, (*addressTemplate)(a))
|
||||
}
|
||||
|
||||
type Strategy struct {
|
||||
|
|
Loading…
Reference in New Issue
Block a user