How to replicate do while in go?
A do..while can more directly be emulated in Go with a for loop using a bool loop variable seeded with true. for ok := true; ok; ok = EXPR { } is more or less directly equivalent to do { } while(EXPR) So in your case: var input int for ok := true; ok; ok … Read more