github.com/aykevl/tinygo@v0.5.0/testdata/slice.txt (about) 1 foo is nil? false false 2 foo: len=4 cap=4 data: 1 2 4 5 3 bar: len=3 cap=5 data: 0 0 0 4 foo[1:2]: len=1 cap=3 data: 2 5 sum foo: 12 6 copy foo -> bar: 3 7 bar: len=3 cap=5 data: 1 2 4 8 slice is nil? true true 9 grow: len=0 cap=0 data: 10 grow: len=1 cap=1 data: 42 11 grow: len=3 cap=4 data: 42 -1 -2 12 grow: len=7 cap=8 data: 42 -1 -2 1 2 4 5 13 grow: len=7 cap=8 data: 42 -1 -2 1 2 4 5 14 grow: len=14 cap=16 data: 42 -1 -2 1 2 4 5 42 -1 -2 1 2 4 5 15 bytes: len=6 cap=6 data: 1 2 3 102 111 111