From cbcf5c6c4e350abe8c14b4b1e57f566522c16c84 Mon Sep 17 00:00:00 2001 From: Pavel Smejkal Date: Tue, 15 Oct 2024 14:30:37 +0200 Subject: [PATCH] fix: lint --- example/contract/contract.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/contract/contract.go b/example/contract/contract.go index 9f98b3f..20efe86 100644 --- a/example/contract/contract.go +++ b/example/contract/contract.go @@ -40,10 +40,11 @@ func NewWorker(name string) *plumber.BaseLooper { time.Sleep(100 * time.Millisecond) fmt.Printf("[%s] starting up\n", name) l.Ready() - tick := time.Tick(1000 * time.Millisecond) + tick := time.NewTicker(1000 * time.Millisecond) + defer tick.Stop() for { select { - case <-tick: + case <-tick.C: // Work fmt.Printf("[%s] work\n", name) case done := <-l.Closing():