1 package main 2 3 // A named slice type is not allowed: use []T directly. Both compilers reject 4 // this shape, and it is why []T directly has no methods. 5 type Names []string 6 7 func main() { 8 var n Names 9 println("names:", len(n)) 10 } 11