Skip to content

Instantly share code, notes, and snippets.

@kazuph
Created April 27, 2014 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuph/11336885 to your computer and use it in GitHub Desktop.
Save kazuph/11336885 to your computer and use it in GitHub Desktop.
golangで配列と配列の連結 ref: http://qiita.com/kazuph/items/4bc33162da7e7d00d80c
slice1 = append(slice1, slice2)
slice1 = append(slice1, slice2)
slice1 := []int{0, 1, 2, 3, 4}
slice2 := []int{55, 66, 77}
fmt.Println(slice1)
slice1 = append(slice1, slice2...) // The '...' is essential!
fmt.Println(slice1)
slice1 := []int{0, 1, 2, 3, 4}
slice2 := []int{55, 66, 77}
fmt.Println(slice1)
slice1 = append(slice1, slice2...) // The '...' is essential!
fmt.Println(slice1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment