Created
June 18, 2018 17:06
-
-
Save dimonomid/c5cb72de51720165d980608730eec299 to your computer and use it in GitHub Desktop.
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
func main() { | |
srcSlice := []int{1, 2, 3} | |
anotherSlice := srcSlice[:3] | |
for i := 0; i < 3; i++ { | |
srcSlice[i] += 10 | |
} | |
fmt.Println(srcSlice) | |
fmt.Println(anotherSlice) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment