Go 基本类型汇总
Go支持一下几种数据类型
类型称呼
类型(Type)
字面量(Literal)
布尔值
bool
true,false
整数
int, int8, uint8, int16, uint16, int32, uint32, int64, uint64
…-1,0,1…
浮点数
float64, float32
23.5, 2e-12
字节
byte (uint8, 1个char)
‘a’
符文
rune (int32, 1个Unicode字符)
‘b’
字符串
string
原创
2020-11-20 18:06:13 ·
1130 阅读 ·
0 评论