Files
learngo/x-tba/slices/10-slice-internals-2-slice-header/1-theory/main.go
2019-01-28 14:23:59 +03:00

22 lines
436 B
Go

// For more tutorials: https://blog.learngoprogramming.com
//
// Copyright © 2018 Inanc Gumus
// Learn Go Programming Course
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
//
package main
import s "github.com/inancgumus/prettyslice"
func main() {
ages := []int{35, 15, 25}
first, last := ages[0:1], ages[1:3]
s.Show("ages", ages)
s.Show("first", first)
s.Show("last", last)
s.Show("nil slice", []int(nil))
}