Go语言中byte和rune实质上就是uint8和int32类型.byte用来强调数据是raw data,而不是数字:而rune用来表示Unicode的code point.参考规范: uint8 the set of all unsigned 8-bit integers (0 to 255) int32 the set of all signed 32-bit integers (-2147483648 to 2147483647) byte alias for uint8 rune ali…
Go语言中new跟make是内置函数,主要用来创建分配类型内存. new( ) new(T)创建一个没有任何数据的类型为T的实例,并返回该实例的指针: 源码解析 func new func new(Type) *Type The new built-in function allocates memory. The first argument is a type, not a value, and the value returned is a pointer to a newly alloc…