Skip to content

Commit

Permalink
调整案例
Browse files Browse the repository at this point in the history
  • Loading branch information
FishGoddess committed Jan 13, 2024
1 parent e69b941 commit a30d126
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions _examples/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,5 @@ func main() {
// Duration is the duration between two loop of fn, optional.
// Run will start a new goroutine and run the task loop.
// The task will stop if context is done.
task.New(printContextValue).
Before(beforePrint).
After(afterPrint).
Context(ctx).
Duration(time.Second).
Run()
task.New(printContextValue).Before(beforePrint).After(afterPrint).Context(ctx).Duration(time.Second).Run()
}
7 changes: 1 addition & 6 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,7 @@ Package cachego provides an easy way to use foundation for your caching operatio
// Duration is the duration between two loop of fn, optional.
// Run will start a new goroutine and run the task loop.
// The task will stop if context is done.
task.New(printContextValue).
Before(beforePrint).
After(afterPrint).
Context(ctx).
Duration(time.Second).
Run()
task.New(printContextValue).Before(beforePrint).After(afterPrint).Context(ctx).Duration(time.Second).Run()
10. clock:
Expand Down

0 comments on commit a30d126

Please sign in to comment.