cheatsheets
Go Basics
Sep 12, 2021
| 3 min read
|
Chris Zietlow
Recovering Software Engineer, Philomath, Shitty Photographer, Technologist, believes the oxford comma isn't optional.
Variables
Strictly Typed and Compiled
1var a bool
2a = false
3b := true
4
5fmt.Println(a, "and", b) // false and true
1type banana int
2var b banana
3fmt.Println(b)
4// 0
5fmt.Printf("%T\n", b)
6// main.banana
Functions
function singature func functionname(parametername type) returntype β¦