2
我想沿着這些線路做一些事情:轉到:投的原始切片別名一片
package main
import (
"fmt"
)
type StringWrap string
func main() {
s := []string{"a","b","c"}
sw := []StringWrap(s) //ERROR: cannot convert s (type []string) to type []StringWrap
fmt.Println(sw)
}
難道我做錯了什麼?或者這只是一個限制?