Skip to content

Commit

Permalink
Update example_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
devfans authored Feb 1, 2021
1 parent ad0e95b commit 944a24e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ func ExampleStart() {
}

func ExampleStart_startWithCancelContext() {
f := func(context.Context) error {
f := func(ctx context.Context) error {
<-time.After(time.Second)
workerId := cogroup.GetWorkerId(ctx)
println(workerId, " did one task")
return nil
}

Expand Down

0 comments on commit 944a24e

Please sign in to comment.