摘要: go 语言中函数是一等公民,因此针对函数的使用也可以多种多样。在go语言中函数可以作为函数参数传递,也可以作为函数的返回值返回。 function type就是一种典型的应用。 关于function type 官方的定义如下 A function type denotes the set of al 阅读全文
posted @ 2022-05-12 19:16 rincloud 阅读(266) 评论(0) 推荐(0)
摘要: // 复制 采用系统默认缓冲区大小 func Copy(dst Writer, src Reader) (written int64, err error){} // 复制 自定义缓冲区大小 func CopyBuffer(dst Writer, src Reader, buf []byte) (w 阅读全文
posted @ 2022-05-12 12:41 rincloud 阅读(84) 评论(0) 推荐(0)