From b233c24d1910d9c577b3162f1016a566edf29e0e Mon Sep 17 00:00:00 2001 From: sudo-nice Date: Thu, 14 May 2020 11:00:13 +0300 Subject: [PATCH] doc: rename field `default` to `init` for array --- doc/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/docs.md b/doc/docs.md index a6df1fd0ea..fc4658739e 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -377,7 +377,7 @@ names = [] // The array is now empty users := []User{} // We can also preallocate a certain amount of elements. -ids := []int{ len: 50, default: 0 } // This creates an array with 50 zeros +ids := []int{ len: 50, init: 0 } // This creates an array with 50 zeros ``` The type of an array is determined by the first element: `[1, 2, 3]` is an array of ints (`[]int`).