This is a creation in Article, where the information may have evolved or changed.
Go language installation using a third-party library method generally uses go get github.com/.../ ... command. For example:
Go get Github.com/astaxie/beego
1. Error condition One:
Package Github.com/astaxie/beego:cannot Download, $GOPATH not set. For more details See:go help Gopath
This is due to the fact that the environment variable Gopath is not set.
The first step: Create a new directory under this directory, three basic directories
Step two: Set/new environment variable Gopath to E:\GOPATH.
2. Error condition Two:
Go:missing Git command. See Https://golang.org/s/gogetcmd package github.com/astaxie/beego:exec: "git": Executable file not found in%path%//by o Sfipin
This is because Git is not installed, or GIT is installed but environment variables are not set.
The first step: check if Git is installed and there is no installed download installation.
Download Address: Http://git-scm.com/downloads.
NET disk Link: Http://pan.baidu.com/s/1pJxifDD Password: ag8u
Step Two: Set the environment variables.
The default installation location for Git is at: C:\Program Files\git. The value of the path variable we want to set is: C:\Program files\git\bin.
Final Run Effect:
Auto download Go package in E:\GOPATH\SRC.