From 9b35f75505f583964dfd848c425e0d64da4d7699 Mon Sep 17 00:00:00 2001 From: Neo Date: Mon, 20 Nov 2023 02:08:29 +0800 Subject: [PATCH] fix: Initialize go empty slice (#947) * Fix: Initialize go empty slice * Update list.md --------- Co-authored-by: Yudong Jin --- docs/chapter_array_and_linkedlist/list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chapter_array_and_linkedlist/list.md b/docs/chapter_array_and_linkedlist/list.md index 77c48d5af..0bf089993 100755 --- a/docs/chapter_array_and_linkedlist/list.md +++ b/docs/chapter_array_and_linkedlist/list.md @@ -65,7 +65,7 @@ ```go title="list_test.go" /* 初始化列表 */ // 无初始值 - nums1 := []int + nums1 := []int{} // 有初始值 nums := []int{1, 3, 2, 5, 4} ```