blob: 5b622547c3b1e9699cd66362678c0ac874b35979 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package main
import (
"fmt"
"os"
"strings"
"github.com/gammons/todolist/todolist"
)
func main() {
if len(os.Args) <= 1 {
usage()
os.Exit(0)
}
routeInput(os.Args[1])
}
func usage() {
fmt.Println("usage")
}
func routeInput(command string) {
app := todolist.NewApp()
input := strings.Join(os.Args[1:], " ")
switch {
case command == "l" || command == "list":
app.ListTodos(input)
}
}
|