摘要:
先上代码: package main import "fmt" // Option custom setup config type Option func(*option) // option 参数配置项 type option struct { sex int age int } // NewF 阅读全文
摘要:
首先要明确channel是什么 channel是一种类型,一种引用类型。声明通道类型的格式如下: var test chan type test := make(chan struct{}) (make只能创建 slice,map,chan) make和new的区别 引用资料 (make 创建一个类 阅读全文