diff options
Diffstat (limited to 'doc/go_for_cpp_programmers.html')
-rw-r--r-- | doc/go_for_cpp_programmers.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/go_for_cpp_programmers.html b/doc/go_for_cpp_programmers.html index a2291715c..fae2ec44e 100644 --- a/doc/go_for_cpp_programmers.html +++ b/doc/go_for_cpp_programmers.html @@ -198,7 +198,7 @@ the <code>else</code>, causing a syntax error. Since semicolons do end statements, you may continue using them as in C++. However, that is not the recommended style. Idiomatic Go code omits unnecessary semicolons, which in practice is all of them other -than the initial <for> loop clause and cases where you want several +than the initial <code>for</code> loop clause and cases where you want several short statements on a single line. <p> @@ -668,7 +668,7 @@ func manager(ch chan cmd) { var val int = 0 for { c := <- ch - if c.get { c.val = val ch <- c } + if c.get { c.val = val; ch <- c } else { val = c.val } } } |