Repository for the training of Go language.
The project contains distinct directories:
- variables and functions directory focuses on the basics of Go i.e. variables, datatypes, and simple functions
- control structure focuses on the control structures i.e. if else, switches, and loops
- arrays and slices directory focuses on the arrays, slices, and range and append functions of slices
- maps directory focuses on the maps and use of range over maps
- structs directory focuses on the structs, struct literals, and methods of structs
- function closures directory focuses on the anonymous functions and function closures
- generics directory focuses on the generic types, and type parameters
- goroutines and channels directory focuses on the goroutines, simple and bufferred channels and use of range over channels
- select directory focuses on the select statement
- mutex directory focuses on the Lock and Unlock methods of sync.mutex and defer statement to defer the execution of a function
Git
Go
All files should be executed from command line in the following way:
- First goto the directory where code resides
cd Variables_and_Functions
- Run the go build command to compile the code into an executable
go build
- Run the new Variables_and_Functions executable
- On Linux or Mac
./Variables_and_Functions- On Windows
Variables_and_Functions.exe
Ahmad Awab