Merge pull request #81 from axnsan12/master
fix component status parsing
This commit is contained in:
@@ -82,7 +82,7 @@ func (incident *Incident) GetComponentStatus(cfg *CachetMonitor) (int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var data struct {
|
var data struct {
|
||||||
Status int `json:"status"`
|
Status int `json:"status,string"`
|
||||||
}
|
}
|
||||||
if err := json.Unmarshal(body.Data, &data); err != nil {
|
if err := json.Unmarshal(body.Data, &data); err != nil {
|
||||||
return 0, fmt.Errorf("Cannot parse component body: %v. Err = %v", string(body.Data), err)
|
return 0, fmt.Errorf("Cannot parse component body: %v. Err = %v", string(body.Data), err)
|
||||||
|
|||||||
Reference in New Issue
Block a user