Skip to content

Instantly share code, notes, and snippets.

@dimonomid
Created April 21, 2018 00:00
Show Gist options
  • Save dimonomid/1e4b33508bc89c99f573014e69064707 to your computer and use it in GitHub Desktop.
Save dimonomid/1e4b33508bc89c99f573014e69064707 to your computer and use it in GitHub Desktop.
func main() {
s := []int{1, 2, 3}
p := s[:3]
for i := 0; i < 3; i++ {
s[i] += 10
}
fmt.Println(s)
fmt.Println(p)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment