Files
materials/knowledge/Go/06-slice.html
huanghaosheng 14d98f2170 docs(go): 澄清 6.5 里 a[:2] 取到的是 [1 2] 而不是 [1 2 3]
上界 2 不包含在内,长度 = 上界 − 下界 = 2,但容量仍是 4;demo 增加一行
len/cap 打印,先让读者看见「长度 2、容量 4」再解释为什么追加不扩容。
2026-10-25 15:29:46 +08:00

50 KiB