Get Programming with Go introduces you to the powerful Go language without confusing jargon or high-level theory. By working through 32 quick-fire lessons, you’ll quickly pick up the basics of the innovative Go programming language! Go is a small pr
一、语法结构
golang源码采用UTF-8编码。空格包括:空白,tab,换行,回车。
– 标识符由字母和数字组成(外加’_’),字母和数字都是Unicode编码。
– 注释:
代码如下:
/* This is a comment; no nesting */
// So is this.
二、字面值(literals)类似C语言中的字面值,但数值不需要符号以及大小标志:
代码如下:
23
0x0FF
1.234e7类似C中的字符串,但字符串是Unicode/UTF-8编码的。同时,\x