标签:类型断言

Golang 类型断言

gopher Golang 23 次浏览 ,
示例 assert.go package main import "fmt" type Point struct { x int y int } func main() { var a interface{} var point Point = Point{1, 2} a = point var b Point b = a.(Point) //类型断言...
Go