Slide 3
Slide 3 text
Declaring and Creating Slices
A slice of type T :
is declared using []T
var a []int
is created using []T{ el1, el2,...elN}
var s = []int{1, 2, 3}
s := []int{1, 2, 3}
Just like an array but without specifying
any size in the brackets [] . Try it!
「Trying to make you to fall in love with Golang」 - Slices
3 / 12
Slices in Go
Luca Sepe
Software Craftsman, Solution Architect, Trainer
https://twitter.com/lucasepe/
https://github.com/lucasepe/
https://lucasepe.it/