From 083476e9b132ca7428e77737c43f35a8ba02bdb3 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Fri, 30 Oct 2020 13:13:26 +0000 Subject: [PATCH] Update 'content/posts/golang-append.md' --- content/posts/golang-append.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/posts/golang-append.md b/content/posts/golang-append.md index 985f7ac..164db8c 100644 --- a/content/posts/golang-append.md +++ b/content/posts/golang-append.md @@ -47,15 +47,15 @@ package main import "fmt" func main() { - first := []int{0, 1, 2, 3, 4, 5, 6} - second := []int{4, 5, 6} + first := []int{0, 1, 2, 3, 4, 5, 6} + second := []int{4, 5, 6} - fmt.Println(first) - // -> [0 1 2 3 4 5 6] - fmt.Println(append(first[:2:2], second...)) - // -> [0 1 4 5 6] - fmt.Println(first) - // -> [0 1 2 3 4 5 6] + fmt.Println(first) + // -> [0 1 2 3 4 5 6] + fmt.Println(append(first[:2:2], second...)) + // -> [0 1 4 5 6] + fmt.Println(first) + // -> [0 1 2 3 4 5 6] fmt.Println("Much better :)") } ``` \ No newline at end of file