From f98a4060643fe9bdc168a5113f21d3248e767550 Mon Sep 17 00:00:00 2001 From: paskozdilar <53006174+paskozdilar@users.noreply.github.com> Date: Sat, 9 Sep 2023 00:53:08 +0200 Subject: [PATCH] pub_sub: go: set publisher sleep to 1 second (#891) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current implementation calls `time.Sleep(1000)` with untyped literal `1000`, which is interpreted as 1000 nanoseconds, or 1 millisecond. This commit changes the sleep duration to proper typed constant `time.Second`, which corresponds to the sleep time of other language examples. Signed-off-by: Paško Zdilar --- pub_sub/go/http/checkout/app.go | 2 +- pub_sub/go/sdk/checkout/app.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pub_sub/go/http/checkout/app.go b/pub_sub/go/http/checkout/app.go index d19183691..85ace8d3f 100644 --- a/pub_sub/go/http/checkout/app.go +++ b/pub_sub/go/http/checkout/app.go @@ -45,6 +45,6 @@ func main() { fmt.Println("Published data:", order) - time.Sleep(1000) + time.Sleep(time.Second) } } diff --git a/pub_sub/go/sdk/checkout/app.go b/pub_sub/go/sdk/checkout/app.go index fa132bc46..e92395ca7 100644 --- a/pub_sub/go/sdk/checkout/app.go +++ b/pub_sub/go/sdk/checkout/app.go @@ -33,6 +33,6 @@ func main() { fmt.Println("Published data:", order) - time.Sleep(1000) + time.Sleep(time.Second) } }