We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 891547e commit 507cc34Copy full SHA for 507cc34
doc/go_spec.html
@@ -4329,6 +4329,7 @@ <h4 id="Conversions_from_slice_to_array_pointer">Conversions from slice to array
4329
<pre>
4330
s := make([]byte, 2, 4)
4331
s0 := (*[0]byte)(s) // s0 != nil
4332
+s1 := (*[1]byte)(s[1:]) // &s1[0] == &s[1]
4333
s2 := (*[2]byte)(s) // &s2[0] == &s[0]
4334
s4 := (*[4]byte)(s) // panics: len([4]byte) > len(s)
4335
0 commit comments