meta/v1: check error from json.Unmarshal()

This commit is contained in:
Hongchao Deng 2018-03-22 10:57:05 -07:00 committed by Hongchao Deng
parent 52ed0368f8
commit 32f3601fa4

View File

@ -106,7 +106,10 @@ func (t *Time) UnmarshalJSON(b []byte) error {
}
var str string
json.Unmarshal(b, &str)
err := json.Unmarshal(b, &str)
if err != nil {
return err
}
pt, err := time.Parse(time.RFC3339, str)
if err != nil {