aboutsummaryrefslogtreecommitdiffstats
path: root/todo.go
diff options
context:
space:
mode:
Diffstat (limited to 'todo.go')
-rw-r--r--todo.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/todo.go b/todo.go
index 5b62254..c6bd052 100644
--- a/todo.go
+++ b/todo.go
@@ -13,19 +13,18 @@ func main() {
usage()
os.Exit(0)
}
- routeInput(os.Args[1])
+ input := strings.Join(os.Args[1:], " ")
+ routeInput(os.Args[1], input)
}
func usage() {
fmt.Println("usage")
}
-func routeInput(command string) {
+func routeInput(command string, input string) {
app := todolist.NewApp()
- input := strings.Join(os.Args[1:], " ")
switch {
case command == "l" || command == "list":
app.ListTodos(input)
}
-
}