feat: adding list_by command

This commit is contained in:
2026-04-03 15:23:58 +02:00
parent 10aabc8c0a
commit 12de0f1b6c
3 changed files with 46 additions and 5 deletions

View File

@@ -25,7 +25,20 @@ func main() {
commands.Help()
}
case "list":
commands.ListTasks(backlog)
switch len(os.Args[1:]) {
case 1:
commands.ListTasks(backlog)
case 2:
switch os.Args[2] {
case "todo", "doing", "done":
commands.ListTasksBy(os.Args[2], backlog)
default:
fmt.Printf("Unknown status %s", os.Args[2])
}
default:
fmt.Println("Too many arguments !")
}
case "progress":
if len(os.Args[1:]) == 2 {
id, err := strconv.ParseUint(os.Args[2], 10, 32)