Welcome to my training path to master GoLang in one month. In this repository, I will provide examples and exercises for all the basics of GoLang programming language. Whether you are a beginner or an experienced developer, this training path will help you to improve your skills and learn GoLang in a short amount of time.
Resources can be found here.
Before starting this training path, you should have basic knowledge of programming concepts and syntax. You should also have GoLang installed on your system. If you don't have GoLang installed, please follow the official installation guide for your operating system: https://golang.org/doc/install.
Trying out Go by Example by @mmcgrana, i've created one go file for each topic.
- Variables
- Constants
- For
- If/Else
- Switch
- Arrays
- Slices
- Maps
- Range
- Functions
- Multiple Return Values
- Variadic Functions
- Closures
- Recursion
- Pointers
- Structs
- Methods
- Interfaces
- Errors
- Goroutines
- Channels
- Channel Buffering
- Channel Synchronization
- Channel Directions
- Select
- Non-Blocking Channel Operations
- Closing Channels
- Range over Channels
- Timers
- Tickers
- Worker Pools
- Rate Limiting
- Atomic Counters
- Mutexes
- Stateful Goroutines
- Sorting
- Sorting by Functions
- Panic
- Defer
- Collection Functions
- String Functions
- String Formatting
- Regular Expressions
- JSON
- Time
- Epoch
- Time Formatting / Parsing
- Random Numbers
- Number Parsing
- URL Parsing
- SHA1 Hashes
- Base64 Encoding
- Reading Files
- Writing Files
- Line Filters
- Command-Line Arguments
- Command-Line Flags
- Environment Variables
- Spawning Processes
- Exec'ing Processes
- Signals
- Exit
Reference: https://quii.gitbook.io/learn-go-with-tests/
- Hello Example
This section is for discovering Go official or unofficial packages. It is like a sandbox for more advanced examples and tools that can be useful when doing awsome things.
-
This example uses
golang.org/x/crypto/ssh
to run an arbitary commands in a remote server. May be useful when creating programs that needs to make sshing stuff in a remote server. -
This example will establish an ssh tunnel listening from localhost passing through a bastion to a remote server.
-
- Out cluster Example: Discovering k8s go client to list pods and nodes from outside the cluster.