github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/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 16 slice to array pointer: 1 -2 20 4 17 unsafe.Add array: 1 5 8 4 18 unsafe.Slice array: 3 3 9 15 4 19 len: 0