]> Cypherpunks repositories - gostls13.git/commitdiff
spec: escape double-ampersands
authorzigo101 <22589241+zigo101@users.noreply.github.com>
Mon, 17 Nov 2025 02:33:01 +0000 (02:33 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 19 Nov 2025 21:35:12 +0000 (13:35 -0800)
Change-Id: I7ce375f975a86e4c2494d2003aeb9b4a86caff3e
GitHub-Last-Rev: a368bc020816cdadb06a918bd90576b490879ae8
GitHub-Pull-Request: golang/go#76299
Reviewed-on: https://go-review.googlesource.com/c/go/+/720460
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

doc/go_spec.html

index a2f22e31dbfed90fe9a140590aed9cdb87981d3a..77400ad210ebb60481fa77cd7e35288601a22614 100644 (file)
@@ -4857,7 +4857,7 @@ For instance, <code>x / y * z</code> is the same as <code>(x / y) * z</code>.
 x &lt;= f()                   // x &lt;= f()
 ^a &gt;&gt; b                    // (^a) >> b
 f() || g()                 // f() || g()
-x == y+1 &amp;&amp; &lt;-chanInt &gt; 0  // (x == (y+1)) && ((&lt;-chanInt) > 0)
+x == y+1 &amp;&amp; &lt;-chanInt &gt; 0  // (x == (y+1)) &amp;&amp; ((&lt;-chanInt) > 0)
 </pre>
 
 
@@ -6867,7 +6867,7 @@ type Tree[K cmp.Ordered, V any] struct {
 }
 
 func (t *Tree[K, V]) walk(yield func(key K, val V) bool) bool {
-       return t == nil || t.left.walk(yield) && yield(t.key, t.value) && t.right.walk(yield)
+       return t == nil || t.left.walk(yield) &amp;&amp; yield(t.key, t.value) &amp;&amp; t.right.walk(yield)
 }
 
 func (t *Tree[K, V]) Walk(yield func(key K, val V) bool) {