diff --git a/statusscreen-pollen.go b/statusscreen-pollen.go index 795e429..0039493 100644 --- a/statusscreen-pollen.go +++ b/statusscreen-pollen.go @@ -76,6 +76,14 @@ func (pollen *Pollen) GetOutput() []string { } for _, v2 := range v.Pollen { + // Drop rows that have the status: "inga halter" or "ingen rapport" + if v2.Day0Description[:3] == "ing" && + v2.Day1Description[:3] == "ing" && + v2.Day2Description[:3] == "ing" && + v2.Day3Description[:3] == "ing" { + continue + } + table.Append([]string{ v2.Type, v2.Day0Description, @@ -86,6 +94,10 @@ func (pollen *Pollen) GetOutput() []string { } } + if table.NumLines() == 0 { + return []string{} + } + table.Render() return strings.Split(b.String(), "\n")