1.len:用来求长度,比如string、array、slice、map、channel
2.new:用来分配内存,主要用来分配值类型,比如int、float32、struct等等,返回的是指针
3.make:用来分配内存,主要用来分配引用类型,比如chan、map、slice
1.len:用来求长度,比如string、array、slice、map、channel
2.new:用来分配内存,主要用来分配值类型,比如int、float32、struct等等,返回的是指针
3.make:用来分配内存,主要用来分配引用类型,比如chan、map、slice
上一篇:十五:GO语言的错误处理机制
Go 语言内置的 Handler
closeclose用于关闭一个channel,使用close函数要注意以下几点:关闭一个只接受的cha
Go日志项目
go语言中的占位符还是比较多的,所以特地记录以下方便查阅
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M