mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-21 00:47:11 +08:00
fix: fix slice init length
Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
parent
2cbe09195e
commit
4eefa65514
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue