(tasks []*model.Task, statuses []string)
| 85 | } |
| 86 | |
| 87 | func excludeByStatus(tasks []*model.Task, statuses []string) []*model.Task { |
| 88 | excludeMap := make(map[string]bool, len(statuses)) |
| 89 | for _, s := range statuses { |
| 90 | excludeMap[s] = true |
| 91 | } |
| 92 | |
| 93 | filtered := make([]*model.Task, 0, len(tasks)) |
| 94 | for _, task := range tasks { |
| 95 | if !excludeMap[string(task.Status)] { |
| 96 | filtered = append(filtered, task) |
| 97 | } |
| 98 | } |
| 99 | return filtered |
| 100 | } |