Mascot Town building
Go Language Overview
Go (Golang) is a static strongly typed, compiled, parallel, and garbage collection programming language developed by Google. Optimized for programming applications on multiprocessor systems, Go is a very useful and powerful system language. Go programs can run as fast as C or C++ code, and it’s also safer to execute parallel processes. Go supports object orientation and has features such as true closures and reflection. Go can reduce code complexity without losing application performance.
Environment set up
All things are difficult before they are easy… Enter golang.google.cn/dl/… Loading failed for half a day… Should be by the wall… ah
After a long search… Finally found it at studygolang.com/dl… Then just click on the link to download… It’s not easy…
Attached I downloaded the source code and MSI program: go source code and Windows installation package.rar
The demo code
Write a classic demo: Hello.go
package main
import "fmt"
func main(a){
fmt.Println("hello, world.");
}
Copy the code
Compile and execute this go file:
PS C:\Users\Mints\Desktop> go build hello.go
PS C:\Users\Mints\Desktop> .\hello.exe
Hello, World!
Copy the code
It can also be executed using the go run command:
PS C:\Users\Mints\Desktop> go run hello.go
Hello, World!
Copy the code