Skip to content

Commit

Permalink
fix: Initialize go empty slice (krahets#947)
Browse files Browse the repository at this point in the history
* Fix: Initialize go empty slice

* Update list.md

---------

Co-authored-by: Yudong Jin <[email protected]>
  • Loading branch information
Neo and krahets authored Nov 19, 2023
1 parent 732750b commit 9b35f75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/chapter_array_and_linkedlist/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
```go title="list_test.go"
/* 初始化列表 */
// 无初始值
nums1 := []int
nums1 := []int{}
// 有初始值
nums := []int{1, 3, 2, 5, 4}
```
Expand Down

0 comments on commit 9b35f75

Please sign in to comment.