array := []int{1, 2, 3, 4}
fmt.Println("Full array", array) // Full array [1 2 3 4]
fmt.Println("Skip 2 first", array[2:]) // Skip 2 first [3 4]
fmt.Println("2 first", array[:2]) // 2 first [1 2]
Last active
December 10, 2018 19:40
-
-
Save Tuizi/e628514349ba5592a7eceeba10f1e71a to your computer and use it in GitHub Desktop.
Go - Cheat Sheet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment