From a30d1267937c891805cc60033e91bdeeed11e6a3 Mon Sep 17 00:00:00 2001 From: FishGoddess <1149062639@qq.com> Date: Sat, 13 Jan 2024 20:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _examples/task.go | 7 +------ doc.go | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/_examples/task.go b/_examples/task.go index c9c27b0..db814ad 100644 --- a/_examples/task.go +++ b/_examples/task.go @@ -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() } diff --git a/doc.go b/doc.go index 819a092..a9334bc 100644 --- a/doc.go +++ b/doc.go @@ -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: