summaryrefslogtreecommitdiffhomepage
path: root/go.html.markdown
diff options
context:
space:
mode:
authorDavid Hsieh <davidhsiehlo@gmail.com>2016-03-11 08:39:26 -0600
committerDavid Hsieh <davidhsiehlo@gmail.com>2016-03-11 08:39:26 -0600
commit8d1e2e31ef9c62e2833ccb83cde78caef668f044 (patch)
tree1cca5af13a146c0a36ef760b6264d18875290ec0 /go.html.markdown
parent51c2f7ce28caf1cc654bcafc4063f3012cc2f0c3 (diff)
parent6e38442b857a9d8178b6ce6713b96c52bf4426eb (diff)
Merge conflict r-spanish
Diffstat (limited to 'go.html.markdown')
-rw-r--r--go.html.markdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/go.html.markdown b/go.html.markdown
index a857a76c..dc684227 100644
--- a/go.html.markdown
+++ b/go.html.markdown
@@ -108,12 +108,13 @@ can include line breaks.` // Same string type.
bs := []byte("a slice") // Type conversion syntax.
// Because they are dynamic, slices can be appended to on-demand.
- // To append elements to a slice, built-in append() function is used.
+ // 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.
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]
+
// To append another slice, instead of list of atomic elements we can
// pass a reference to a slice or a slice literal like this, with a
// trailing ellipsis, meaning take a slice and unpack its elements,