Skip to content

Commit 68f9c2c

Browse files
committed
Update docs
1 parent 2c876d2 commit 68f9c2c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/migrate-v2-to-v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ in addition to other specific args. This allows handler functions to utilize con
123123
blocking/time-specific operations and so on
124124

125125
* OLD: `type BeforeFunc func(*Context) error`
126-
* NEW: `type BeforeFunc func(context.Context, *cli.Command) error`
126+
* NEW: `type BeforeFunc func(context.Context, *cli.Command) (context.Context, error)`
127127

128128
* OLD: `type AfterFunc func(*Context) error`
129129
* NEW: `type AfterFunc func(context.Context, *cli.Command) error`

docs/v3/examples/full-api-example.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ func main() {
153153
ShellComplete: func(ctx context.Context, cmd *cli.Command) {
154154
fmt.Fprintf(cmd.Root().Writer, "lipstick\nkiss\nme\nlipstick\nringo\n")
155155
},
156-
Before: func(ctx context.Context, cmd *cli.Command) error {
156+
Before: func(ctx context.Context, cmd *cli.Command) (context.Context, error) {
157157
fmt.Fprintf(cmd.Root().Writer, "HEEEERE GOES\n")
158-
return nil
158+
return nil, nil
159159
},
160160
After: func(ctx context.Context, cmd *cli.Command) error {
161161
fmt.Fprintf(cmd.Root().Writer, "Phew!\n")

0 commit comments

Comments
 (0)