Go language background birth
- Computer hardware updated frequently, mainstream programming language can not play to the performance of multi-core CPU
- Software system complexity continually high, the lack of simple and efficient programming language
- C / C ++ run fast, but slow compilation
Go Language Features
Statically typed language development
Static: compile-time type checking variables, such as C ++, Java
Dynamic: run-time type checking variables, such as JavaScript
Automatic garbage collection
Fast compilation speed (compiled directly into machine code, does not depend on other libraries)
High concurrent performance (language-level support concurrent)
Easy to deploy (less dependency on library)
Function returns a plurality of values
Go language scenarios, open source framework
Scenario:
- Block chain development
- Server / game software development
- Distributed / cloud computing development
Open source framework:
- TPU
- Lris
- Revel
win10 development environment configuration Golang
Download: https://golang.google.cn/
About environment variable configuration:
I downloaded version is 1.13.5, after the msi file installed automatically add environment variables:
Test whether the installation was successful:
go version
Integrated Development Environment Goland
Go official recommendation IDE:
Goland Download: https://www.jetbrains.com/
Run HelloWorld
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello ,World!")
}
To .go file extension
package statement package belongs
End statement semicolon is omitted by default
No main entry point parameters, and must be placed in the main package
import import standard library / third-party packages