package main
import "fmt"
func main() {
// The make() builtin creates a an anonymous array, and
// returns a slice which refers to it. The parameters are
// the slice size and array size. The array size defaults
// to the slice size.
sli := make([]string, 5, 8)
whole := sli[0:8]
// Fill up 0-4
for i := range(sli) {
sli[i] = "foo"
}
// Fill up the rest.
sli = sli[5:8]
for i := range(sli) {
sli[i] = "bar"
}
// See what we got.
for _,v := range(whole) {
fmt.Print(v + " ")
}
fmt.Println()
}