Tag: 类型断言

Golang 类型断言

Jackey Golang 3,231 次浏览 ,
示例 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