diff options
author | Ricardo Islas Ruiz <ricardo.islas.ruiz@gmail.com> | 2024-02-25 14:46:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 22:46:12 +0100 |
commit | 16fa336a43a16c9515cdaa8a18276b05f47f3ffe (patch) | |
tree | 94af79f880cd4ae537f1d6d6b40cf03a18a17fe0 /go.html.markdown | |
parent | ebd63d9299dbcb007185fa7e4b377893466b73c9 (diff) |
[go/en]: Clarify comment related to the append function in slices. (#4780)
Diffstat (limited to 'go.html.markdown')
-rw-r--r-- | go.html.markdown | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/go.html.markdown b/go.html.markdown index d6468f58..0631ffab 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -130,7 +130,7 @@ can include line breaks.` // Same string type. // Because they are dynamic, slices can be appended to on-demand. // To append elements to a slice, the built-in append() function is used. // First argument is a slice to which we are appending. Commonly, - // the array variable is updated in place, as in example below. + // the slice variable is updated in place, as in example below. s := []int{1, 2, 3} // Result is a slice of length 3. s = append(s, 4, 5, 6) // Added 3 elements. Slice now has length of 6. fmt.Println(s) // Updated slice is now [1 2 3 4 5 6] |