1
0

added a few more things to the slices example

This commit is contained in:
Stephen M. McQuay 2012-08-27 22:28:04 -06:00
parent e26ef31903
commit c94a5c6613

View File

@ -18,8 +18,12 @@ func main() {
fmt.Println("p[:3] == ", p[:3])
fmt.Println("p[4:] == ", p[4:])
v := make([]string, 0)
v := make([]string, 30, 1024)
fmt.Printf("%v\n", v)
fmt.Printf("%v\n", cap(v))
v = append(v, "hello", "world")
fmt.Printf("%v\n", v)
:= 12.34
fmt.Printf("%v\n", )
}