Repository with basics about Go programming.
- Installing Go on Ubuntu
$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt-get update
$ sudo apt-get install golang-go
For anothers S.O and distribution check the main page.
- Set GoPath for your workspace.
export GOPATH=/home/myuser/goProjects
I recommend you add it to your .bashrc
or .zshrc
.
Just type the following command
$ go run filename.go
- 00. Hello World
- 01. Vars Declarations
- 02. Standard Input
- 03. More examples about Standard Input
- 04. Functions
- 05. Calculator
- 06. Strings
- 07. Switch
- 08. Arrays
- 09. Packages
- 10. Conditionals
- 11. Loops
- 12. Map
- 13. Structs
- 14. Methods
- 15. Interfaces
- 16. Defer
- 17. Panic
- 18. Pointers
- 19. Goroutines
- 20. Channels
- 21. More Channels
- 22. Server
- 23. Api
- 24. Files
- More examples