diff options
| author | demo <demo@antix1> | 2026-05-29 10:24:27 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-05-29 10:24:27 -0400 |
| commit | 5fdc04709975732733bf0ddc1308ea25c0cb453a (patch) | |
| tree | 33f436a58139ed1e36a96af7398d417b488f2186 /cmds.go | |
| parent | 5b03eac7cb9e7b5c736e217d8a63b4ac14af28be (diff) | |
refactor: funnel business logic into bespoke functions
This way:
1. We don't have to stuff all our business logic where urfave is set
up.
2. Our functions aren't forced to use the signature required by the
Action field.
Diffstat (limited to 'cmds.go')
| -rw-r--r-- | cmds.go | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +package main + +import ( + "fmt" +) + +func cmdAdd(task string) error { + fmt.Println("added task: ", task) + return nil +} + +func cmdDo(taskIndex int) error { + fmt.Println("completed task: ", taskIndex) + return nil +} + +func cmdList() error { + fmt.Println("listed pending tasks") + return nil +} |
