I prefer to show the intent of the bool with something like
for done :=false;!done;{
//stuff
done = xxx // done = expr in until(expr)
}
On Friday, October 7, 2016 at 7:25:02 PM UTC-4, [email protected] wrote:
>
> Any suggestions on a way to write a repeat until loop equivalent in golang
> that looks tidy
>
> currently I do :
>
> ib := true
> for i := a.X; i != b.X || ib; i = i + b.X - a.X {
> ib = false
> //stuff
> }
>
>
> for loops that need to be executed once under all conditions..
>
> maybe there's neater or better way ?
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.