diff --git a/src/monitor/check.go b/src/monitor/check.go index 85ce5d2..df7f5fd 100644 --- a/src/monitor/check.go +++ b/src/monitor/check.go @@ -198,6 +198,9 @@ func CheckStock(page int, keyWords []Keyword) (isSucccess bool, isMore bool, pro totalGoods = 0 for _, product := range productsList { status := product.(map[string]interface{})["status"] + if status == nil { + continue + } if int(status.(float64)) != 1 { continue }