This is a creation in Article, where the information may have evolved or changed.
basic data types for the Go language Boolean type: BOOL integral type: int8, Byte, int16, int, uint, uintptr, etc. floating-point types: float32, float64 plural type: complex64, complex128 strings: string character type: Rune fault Type: Error The int8 represents a byte-long shape (-128 ~ 127), and the corresponding uint8 represents a non-negative byte-length shaping (0 ~ 255), Byte is the same as uint8, the length of an int is associated with the operating system, and the 32-bit system length is 4 bytes. The 64-bit system is 8 bytes; The go language adds a string as the base type, which is different from Java definition of the Go language variable Mode 1: var B1 bool = True variable definition, preceded by the addition of a var keyword, the entire language like JavaScript (not strict type requirements), followed by the bool type restrictions, in fact, the type of strict language. Turn around from Java and need to adapt. Mode 2: B2: = True str: = "Hello go" variable definitions, without the VAR keyword, or the type, where the variable type is qualified by the following value. This is a whole, at the same time B2 can not be in front of the declaration, otherwise will error. operator + 、-、 *,/,% with the Java language; x << y shift left x >> y shift right x ^ y xor x & Y and x | y or ^x Reverse &NBSP;