mirror of https://github.com/dapr/quickstarts.git
pub_sub: go: set publisher sleep to 1 second (#891)
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 <pasko.zdilar@meshmind.io>
This commit is contained in:
parent
a9a48ec754
commit
f98a406064
|
@ -45,6 +45,6 @@ func main() {
|
|||
|
||||
fmt.Println("Published data:", order)
|
||||
|
||||
time.Sleep(1000)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,6 @@ func main() {
|
|||
|
||||
fmt.Println("Published data:", order)
|
||||
|
||||
time.Sleep(1000)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue