Golang Cheat Sheet
Go Cheat Sheet
Credits Most example code taken from A Tour of Go, which is an excellent introduction to Go. If you're new to Go, do that tour. Seriously.
Original HTML Cheat Sheet by Ariel Mashraki (a8m):
Go in a Nutshell ? Imperative language ? Statically typed ? Syntax similar to Java/C/C++, but less parentheses and no semicolons ? Compiles to native code (no JVM) ? No classes, but structs with methods ? Interfaces
? No implementation inheritance. There's type embedding, though.
? Functions are first class citizens ? Functions can return multiple values ? Has closures ? Pointers, but not pointer arithmetic ? Built-in concurrency primitives: Goroutines and Channels
Basic Syntax
Hello World File hello.go:
package main
import "fmt"
func main() { fmt.Println("Hello Go")
}
$ go run hello.go
Operators
Arithmetic
Operator + * / % & | ^ &^ >
Description addition subtraction multiplication quotient remainder bitwise AND bitwise OR bitwise XOR bit clear (AND NOT) left shift right shift (logical)
Comparison
Operator == != < >=
Description equal not equal less than less than or equal greater than greater than or equal
Logical
Operator && || !
Description logical AND logical OR logical NOT
Other
Operator & *
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- golang map declare initialize access iterate update
- go programming tutorialspoint
- the go programming language
- go programming language
- hidden dragons of cgo hard learned lessons from writing
- how to create string array in go tutorial kart
- golang cheat sheet
- go tutorial sp17 ucsd cse
- table of contents
- effective go1
Related searches
- cheat sheet for word brain game
- macro cheat sheet pdf
- logarithm cheat sheet pdf
- excel formula cheat sheet pdf
- excel formulas cheat sheet pdf
- excel cheat sheet 2016 pdf
- vba programming cheat sheet pdf
- macro cheat sheet food
- free excel cheat sheet download
- onenote cheat sheet pdf
- punctuation rules cheat sheet pdf
- excel formula cheat sheet printable