摘要: Go基础3:函数、结构体、方法、接口 1. 函数 Go语言的函数属于“一等公民”(first-class),也就是说: 函数本身可以作为值进行传递。 支持匿名函数和闭包(closure)。 函数可以满足接口。 1.1 函数返回值 同一种类型返回值 func typedTwoValues() (int, int) { return 1, 阅读全文
posted @ 2022-05-17 23:52 micromatrix 阅读(695) 评论(0) 推荐(0)