Go language, Environment configuration considerations
Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed. go points to Workspace not go directory
Also, you must configure a git path or you cannot use Go's Get function
The Gobee bin in the space root directory does not set the environment variable command is also not directly used, so you have to set the
This is an environment variable reference no Gopath words can not use go get and go get must configure Git
Gopath
D:\gospace
Goroot that is the Go Program root directory windows or write it on Linux when the path specifies the Go\bin directory can not be written under Linux if the installation is not the default directory, such as home under the need to write
D:\go
From here we can see the difference between Goroot and Gopath.
and third-party packages downloaded from GitHub require a zoom position .
Goroot in the pkg, gopath in src .
The bottom few things. The software working directory that I set up in Liteide can also be considered as a separate working environment for the project.
D:/go/go1.3.0/bin/go.exe Run Main.go [D:/GO/QT]
Main.go:4:2:cannot Find Package "github.com/qml-1/" in any of:
D:\Go\go1.3.0\src\pkg\github.com\qml-1 (from $GOROOT)
D:\Go\gospace\src\github.com\qml-1 (from $GOPATH)
D:\Go\test\ Algorithm Example \SRC\GITHUB.COM\QML-1
D:\Go\test\src\github.com\qml-1
D:\Go\egou\src\github.com\qml-1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service