摘要: 自定义类型 Go语言通过type关键字定义自定义类型。自定义类型是全新的类型。示例: // 将newInt定义为int类型 type newInt int func main() { var a newInt a = 100 fmt.Println(a) // 100 fmt.Printf("%T\ 阅读全文
posted @ 2021-11-09 11:48 梁天 阅读(1554) 评论(0) 推荐(0) 编辑