Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| golangbot_tutorial [2019/08/25 09:23] – [Variables] rpjday | golangbot_tutorial [2019/08/27 10:52] (current) – [Misc] rpjday | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy. | The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy. | ||
| + | |||
| ===== Misc ===== | ===== Misc ===== | ||
| + | * " | ||
| * Concurrency | * Concurrency | ||
| * Compiled | * Compiled | ||
| Line 13: | Line 15: | ||
| * Debuggers? | * Debuggers? | ||
| * Code analyzers? | * Code analyzers? | ||
| + | * Install Visual Studio (https:// | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| Line 18: | Line 21: | ||
| ==== Introduction and Installation ==== | ==== Introduction and Installation ==== | ||
| + | Advantages of Go: | ||
| + | |||
| + | * Simple syntax(?) | ||
| + | * Fast compilation | ||
| + | * Static linking | ||
| + | * Concurrency (goroutines and channels) | ||
| + | * Garbage collection | ||
| + | * Simple language specification | ||
| + | * Tooling | ||
| + | * ''/ | ||
| + | * ''/ | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Used as the basis for Docker and Kubernetes. | ||
| + | |||
| + | Third-party tooling, IDEs, etc. | ||
| ==== Hello World ==== | ==== Hello World ==== | ||
| Line 23: | Line 43: | ||
| ==== Variables ==== | ==== Variables ==== | ||
| - | |||
| - | |||
| ==== Types ==== | ==== Types ==== | ||
| - | Go does not allow automatic type promotion or conversion -- "type conversion." | + | * Go is strict about explicit typing. |
| - | + | ||
| - | < | + | |
| - | bool (&&, | + | |
| - | string | + | |
| - | + | ||
| - | int8 int16 int32 int64 | + | |
| - | int (32 or 64 depending) | + | |
| - | + | ||
| - | uint8 uint16 uint32 uint64 | + | |
| - | uint (32 or 64 depending) | + | |
| - | + | ||
| - | uintptr | + | |
| - | + | ||
| - | float32 float64 | + | |
| - | complex64 complex128 | + | |
| - | + | ||
| - | byte // alias for uint8 | + | |
| - | rune // alias for int32 | + | |
| - | </ | + | |
| - | + | ||
| - | '' | + | |
| ==== Constants ==== | ==== Constants ==== | ||
| - | < | + | |
| - | const i = 42 | + | * Not sure what it means that " |
| - | </ | + | * What does it mean that something is "untyped"? |
| - | + | ||
| - | | + | |
| - | * Untyped constants | + | |
| - | < | + | |
| - | const typedhello string = "Hello World" | + | |
| - | </ | + | |
| ===== Functions and Packages ===== | ===== Functions and Packages ===== | ||
| ==== Functions ==== | ==== Functions ==== | ||
| - | |||
| - | * return type //follows// parameter list | ||
| ==== Packages ==== | ==== Packages ==== | ||
| Line 138: | Line 127: | ||
| ===== First Class Functions ===== | ===== First Class Functions ===== | ||
| + | |||
| + | ===== Reflection ===== | ||
| + | |||
| + | ===== File Handling ===== | ||
| + | |||
| + | ==== Reading files ==== | ||
| + | |||
| + | ==== Writing files ==== | ||