This is a creation in Article, where the information may have evolved or changed.
Go Language Learning Series 001-Download and install
[TOC]
Basis
This article is based on Https://go-zh.org/doc/install
Please refer to the official installation documentation for different systems.
Download and go Environment
Offline Download Address: https://golang.org/dl/
Download the corresponding offline package according to your operating system.
For example, I downloaded here: https://storage.googleapis.com/golang/go1.9.darwin-amd64.pkg
Download IDE
The author here is liteide, open source cross-platform.
The download address is as follows: Https://www.golangtc.com/download/liteide
Once resolved, run directly.
Test installation
All programming languages, when learning, are basically hello world. So......
First create a file named hello.go
, add the following code.
package mainimport ( "fmt" "time")func main() { fmt.Println("hello, wolf\n") fmt.Println("The time is", time.Now())}
Click on Build and Run above the IDE BR
. Compile and run. The results appear as follows:
/Users/SLB/Desktop/Go/Code/Code [/Users/SLB/Desktop/Go/Code]hello, wolfThe time is 2017-08-29 13:40:37.190880054 +0800 CST m=+0.000274548成功: 进程退出代码 0.