On Wed, Jan 12, 2022 at 5:02 AM Tobias Klausmann
wrote
> So what is the *idiomatic* way of being able to use `continue` (or
> something like it), yet have "always do this" code at the end of the
> loop? As I understand it, `defer` only works for ends of functions, not
> ends of blocks, and label
Hi!
On Wed, 12 Jan 2022, Rob Pike wrote:
> What's wrong with
>for ;; time.Sleep(delay) { ... }
> ?
>
> This technique is as old as the hills. Or at least as old as C for loops.
Never been a C guy :) Thanks, that works perfectly!
Best,
Tobias
--
You received this message because you are s
What's wrong with
for ;; time.Sleep(delay) { ... }
?
This technique is as old as the hills. Or at least as old as C for loops.
-rob
On Wed, Jan 12, 2022 at 9:02 PM Tobias Klausmann
wrote:
>
> Hi!
>
> Often with tools that poll something, you get code of this form:
>
> ```
> for {
>