Golang 类型断言 Jackey Golang 2020-03-14 3,229 次浏览 Golang, 类型断言 示例 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) //类型断言...