fix address UnmarshalJSON

This commit is contained in:
c9s 2021-05-26 23:37:08 +08:00
parent 967c7e9f9d
commit 9d7f147fbf

View File

@ -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 {