Variables
Variables
var a = 1000 // Inferred "int"
var b float64 = 5.5
var y = float64(a) + b
c := 1000 // Inferred "int"Declare multiple variables in one line
Single vs Double quotes
Single Quotes
Basic types
Custom types (alias)
Add methods to these aliases
Check a value type
Generic types
Multiple generic types
Fetch user input (Stdin)
fmt.Scan
bufio.NewReader(os.Stdin)
Formatting strings
fmt.Printf (to Stdout)
Multiline strings
Variable scopes
Unamed variables
Constants
Pointers
Pass parameter by reference
Arrays
Declared only
Instantiated (Specified size)
Instantiated (Dynamic size)
Access value of array
Lenght and Capacity
Slices
append (values)
append (values)append (slices)
append (slices)Removing elements
make function
make functionMaps
Declare only
Instanciate
Access value of map
Mutating the map
Delete a key
make function
make functionLast updated