fix: fix slice init length

Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
cuishuang 2024-09-26 11:31:07 +08:00
parent 2cbe09195e
commit 4eefa65514

View file

@ -3,7 +3,7 @@ package main
import "fmt"
func listing1() {
s := make([]int, 1)
s := make([]int, 0, 1)
go func() {
s1 := append(s, 1)