![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
golang
蒙山蒙水
遥感和地理信息系统,略懂
展开
-
go语言中的闭包
package mainimport "fmt"//构造闭包func intSeq() func() int { i := 0 return func() int { i++ return i }}func main() { nextInt := intSeq() //生成闭包 fmt.Println(ne...转载 2019-02-21 08:48:51 · 159 阅读 · 0 评论 -
go结构体和类 函数和方法 接口
转自https://blog.csdn.net/qq_37514662/article/details/82563203go中没有类的概念,只有结构体。定义结构体使用type struct 关键字type typeName struct { var1 Type var2 Type ... varn Type}其它面向对象的语言中类包含...转载 2019-03-02 16:12:57 · 179 阅读 · 0 评论