Programming

(Go) slice literal

steloflute 2016. 1. 20. 23:30

http://blog.golang.org/go-slices-usage-and-internals



A slice literal is declared just like an array literal, except you leave out the element count:

letters := []string{"a", "b", "c", "d"}