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


Path
C:\Program Files\java\jdk1.7.0_25\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;d:\wamp \bin\php\php5.4.16; C:\Documents and Settings\All Users\Application Data\composer\bin;d:\program Files\perforce; C:\Program Files\tortoisegit\bin;d:\go\bin;d:\program Files\git\bin;d:\gospace\bin








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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.