Introduction and basic samples to practice and learn with Go
This repo has been created to help you to adopt Go and learn about it
Spanish - (Blog) Introducción a Go o Golang
Some of the most important features of Go are:
- manages the memory for us
- has been created thinking in the concurrency paradigm
- compile to standalone binaries (not interpreted)
- is fast in compilation times (giving us a quick feedback about errors or problems)
- is simple to use
- is strongly typed
- is statically typed
If you have not installed Go on your computer, please... follow this steps
- Download Go
- Install it!
- Open your terminal or command prompt and write
go version
You should see information about Go and the version installed on your computer
All your Go files should have the extension .go
For example:
main.go
There are a lot of commands inside of Go
The basic commands that you will be use for sure are:
- To execute your code:
go run main.go
- To build your code in a standalone binary:
go build
Use some editor to create or modify the samples
-
Atom is a good tool to do it
-
Visual Studio Code ins another very good tool (is the tool that I use really)
The most important here is to use the tool that you want and to be comfortable with it
One important thing here
If you want to use Visual Code as me, don't forget install the Go for Visual Studio Code extension This extension for Visual Studio Code is not necessary but helps
But if you want to run your Go code without install anything... you can!
You can test your Go code in the official web site, or in Go Playground directly
In Go Playground: