mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-16 03:59:18 +08:00
fixed clear list in Go
This commit is contained in:
@@ -208,7 +208,7 @@ comments: true
|
||||
|
||||
```go title="list_test.go"
|
||||
/* 清空列表 */
|
||||
list = []int{}
|
||||
list = nil
|
||||
|
||||
/* 尾部添加元素 */
|
||||
list = append(list, 1)
|
||||
|
||||
Reference in New Issue
Block a user