The Go language is an open-source project developed by Google. It aims to improve the programming efficiency of developers. The Go language syntax is flexible, concise, clear, and efficient. Its concurrency features can be easily used for multi-core processor and network development, while flexible and novel type systems can easily write modular systems. Go can be compiled quickly, with the automatic garbage collection function, and supports runtime reflection. Go 11 is an efficient and static type, but the post office has a system-level syntax for interpreting the dynamic type features of a language.
For more information about how to install go on Ubuntu 386, go to http://code.google.com/p/golang-china /.
1. Install the go language tool
sudo apt-get install bison ed gawk gcc libc6-dev make
If the installation fails, the subsequent installation may fail. You can install the installation separately.
2. Install mercurial
Mercurial is actually a Version Management System (you can check whether it is installed by Hg name), similar to git
sudo apt-get install python-setuptoolssudo apt-get install python-devsudo apt-get install build-essential
3. Get the go language source code
4. Configure Environment Variables
$ Vim. bashrc open the. bashrc file in the home directory and add the following information. For more information, see the official documentation.
Export goroot = $ home/go
Export goarch = 386
Export GOOS = Linux
Export path =$ {path}: $ home/bin
Save, save, and exit.
$ Source. bashrc
Make it take effect
5. Install the go language and compile the go environment.
$ CD go/src
$./All. Bash
Start compilation. The following information is displayed after compilation.
You can also run the following command to view the version information:
6. Then we can start working. The suffix of the Go language is. G, 8G is the compiler, and 8l is the connector. You can use vim or other tools.
One of the problems is mentioned here. during compilation, if the left curly braces "{" is a single line, the compilation will fail.
The following problems occur after compilation:
You can change it to the following method.
Compile and run