mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 22:28:40 +08:00 
			
		
		
		
	fix: Initialize go empty slice (#947)
* Fix: Initialize go empty slice * Update list.md --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
		@ -65,7 +65,7 @@
 | 
				
			|||||||
    ```go title="list_test.go"
 | 
					    ```go title="list_test.go"
 | 
				
			||||||
    /* 初始化列表 */
 | 
					    /* 初始化列表 */
 | 
				
			||||||
    // 无初始值
 | 
					    // 无初始值
 | 
				
			||||||
    nums1 := []int
 | 
					    nums1 := []int{}
 | 
				
			||||||
    // 有初始值
 | 
					    // 有初始值
 | 
				
			||||||
    nums := []int{1, 3, 2, 5, 4}
 | 
					    nums := []int{1, 3, 2, 5, 4}
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user