topics/go/language/slices/README.md
Slices are an incredibly important data structure in Go. They form the basis for how we manage and manipulate data in a flexible, performant and dynamic way. It is incredibly important for all Go programmers to learn how to uses slices.
Go Slices: usage and internals - Andrew Gerrand
Strings, bytes, runes and characters in Go - Rob Pike
Arrays, slices (and strings): The mechanics of 'append' - Rob Pike
Understanding Slices in Go Programming - William Kennedy
Collections Of Unknown Length in Go - William Kennedy
Iterating Over Slices In Go - William Kennedy
Slices of Slices of Slices in Go - William Kennedy
Three-Index Slices in Go 1.2 - William Kennedy
SliceTricks
runtime: Make slice growth formula a bit smoother - Go Team
Declare and Length (Go Playground)
Reference Types (Go Playground)
Appending slices (Go Playground)
Taking slices of slices (Go Playground)
Slices and References (Go Playground)
Strings and slices (Go Playground)
Variadic functions (Go Playground)
Range mechanics (Go Playground)
Efficient Traversals (Go Playground)
Three index slicing (Go Playground)
Part A Declare a nil slice of integers. Create a loop that appends 10 values to the slice. Iterate over the slice and display each value.
Part B Declare a slice of five strings and initialize the slice with string literal values. Display all the elements. Take a slice of index one and two and display the index position and value of each element in the new slice.
Template (Go Playground) | Answer (Go Playground)
All material is licensed under the Apache License Version 2.0, January 2004.