September 2017
Intermediate to advanced
466 pages
9h 33m
English
You can easily find your version of Go using this command:
$ go version go version go1.7.5 darwin/amd64
The previous output is from a macOS machine hence the darwin string. A Linux machine would give the following kind of output:
$ go version go version go1.3.3 linux/amd64
You will learn more about go tool, which you will use all the time, in the next chapters.
As I can imagine, you must be impatient to see some Go code; so here is the Go version of the famous Hello World program:
package main
import "fmt"
// This is a demonstrative comment!
func main() {
fmt.Println("Hello World!")
}
If you are familiar with C or C++, you will find Go code pretty easy to understand. Each file that contains Go code begins with a package ...
Read now
Unlock full access