You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ This directory contains a bunch of example programs built with `cli` to show you
7
7
-[`./quickstart`](#quickstart)
8
8
-[`./subcommands`](#subcommands)
9
9
-[`./namedargs`](#namedargs)
10
+
-[`./cancel`](#cancel)
10
11
-[TODO](#todo)
11
12
12
13
## `./cover`
@@ -31,6 +32,12 @@ A CLI with named positional arguments that may or may not have default values. S
31
32
32
33

33
34
35
+
## `./cancel`
36
+
37
+
This examples shows how `cli` requiring you to pass a `context.Context` to your run functions leads to elegant and resilient cancellation and `CTRL+C` handling.
38
+
39
+

40
+
34
41
### TODO
35
42
36
43
- Replicate one or two well known CLI tools as an example
0 commit comments