Created
April 27, 2014 03:20
-
-
Save kazuph/11336885 to your computer and use it in GitHub Desktop.
golangで配列と配列の連結 ref: http://qiita.com/kazuph/items/4bc33162da7e7d00d80c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slice1 = append(slice1, slice2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slice1 = append(slice1, slice2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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