Go Concepts - Lexical Structure
Jump to navigation
Jump to search
Internal
Identifiers
Types, functions, constants, variables, interfaces.
The blank identifier "_".
Identifiers (not values) can be exported or unexported.
Lower-case letter identifiers
Upper-case letter identifiers
Whitespace
Newlines, spaces and tabs.
Expression
Operators combine operands into expressions.
Literal
String Literal
Numeric Literal
Array Literal
Slice Literal
Map Literal
Struct Literal
Comment
// to the end of the line
/* Multiline line 1 ... line n */
Statements
for
if
Keywords
- Go Specification - Keywords: https://golang.org/ref/spec#Keywords
range | type | func | . | . |
package | go | . | . | . |
defer | chan | . | . | . |