GO language learning one (environmental construction)

As the mainstream projects such as docker, hyperledger-fabric, etheum and other projects have been developed in go language in recent years, I feel that go language will become more and more popular in the future, and I will take time to learn go language to improve my knowledge reserve. 


1. Resource download

1. Go resource package: https://www.golangtc.com/download

2. IDE (gogland) download address: http://www.jetbrains.com/go/download/#section=windows

2. Environment configuration

1. Configure GOROOT and GOPATH environment variables


Add %GOROOT%/bin to Path

Directory structure under GOPATH



Verify that the configuration was successful

Open cmd and enter go version to view version information


2. IDE installation

This default installation can modify the installation directory

3. Simple start

Start the IDE and select the GOPATH directory

In the src directory, select New hello.go

The content is as follows:


package main

import "fmt"
func main() {
	fmt.Println("hello world")
}

Right click and run to see hello world




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325731120&siteId=291194637