Due to the current user's lack of knowledge of the blockchain, coupled with the shortage of professionals in the blockchain and the lure of high salary, the market has spawned a number of blockchain training institutions. Brother Yun Jong, president of the Blockchain training Institute, says consumers need to be careful to differentiate themselves from the chain of training in the blockchain market.
The go language is optimized for programming multi-processor system applications, with go-compiled programs that are comparable to C or C + + code, and are more secure and support parallel processes.
Ubuntu Install go:
sudo add-apt-repository ppa:gophers/go
sudo apt-get update
sudo apt-get install golang-stable
Or
sudo apt-get install Golang
or download the Go language installation package directly
Environment configuration:
Vi/etc/profile
Join
Export Goroot=/usr/lib/go
Export goarch=386
Export Goos=linux
Export Gopath=/home/administrator/workspace/go
Export gobin= $GOPATH/bin
Export path= $GOPATH/bin: $PATH
Source/etc/profile
Create a new three directory under new Gopath
mkdir src Pkg Bin
SRC Storage Source
Pkg to store compiled generated files
Bin holds the resulting executable file
Create your first Go app
CD $GOPATH/SRC
mkdir test1
CD Test1
VI T1.go
[CPP] View plaincopy
Package Main
Import "FMT"
Func Main () {
Fmt. Println ("Hello World, I ' m learning Golang")
}
Main.main () is the entrance to the Go app
Compilation method
1, enter the corresponding application package directory, and then perform go install, you can install the
2. Execute the following code in any directory go install test
3, enter the corresponding application package directory, and then execute go build, will generate the executable file in the current directory
Configure VIM to support go language syntax highlighting
Cp-r $GOROOT/misc/vim/* ~/.vim/Note: $GOROOT is the Go installation directory
VI ~/.VIMRC Join
FileType plugin indent on
Syntax on
Installing Gocode
Go get-u github.com/nsf/gocode
The Gocode is installed by default under $gobin.
Configure Gocode
~ CD $GOPATH/src/github.com/nsf/gocode/vim
~./update.bash
~ Gocode Set Propose-builtins True
Propose-builtins true