Skip to content

Commit 27a2761

Browse files
committed
Range: wrap reference table to prevent Safari overflow
1 parent 42b68f9 commit 27a2761

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Range.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ for i, v := range myArray {
2828

2929
If only one value is used on the left of a range expression, it is the 1st value in this table.
3030

31+
<div style="overflow-x:auto;-webkit-overflow-scrolling:touch">
32+
3133
| Range expression | 1st value | 2nd value (optional) | notes |
3234
|:-----------------|:----------|:---------------------|:------|
3335
| array or slice a ` [n]E `, ` *[n]E `, or ` []E ` | index ` i int ` | ` a[i] ` E |
3436
| string s string type | index ` i int ` | rune ` int ` | range iterates over Unicode code points, not bytes |
3537
| map m ` map[K]V ` | key ` k K ` | value ` m[k] ` V |
3638
| channel c chan E | element ` e E ` | _none_ |
3739

40+
</div>
41+
3842
## Gotchas
3943

4044
When iterating over a slice or map of values, one might try this:

0 commit comments

Comments
 (0)