goLang notes + beego framework

Insert image description here

goLang notes+

GOPATH after initial installation:

The environment variables related to Go development are as follows:

GOROOT: GOROOT is the installation directory of Go , (similar to Java's JDK)
GOPATH: GOPATH is our workspace , which saves go project code and third-party dependency packages.
Multiple GOPATHs can be set, among which the first one will be the default. Package directory, the package downloaded using go get will be in the src directory in the first path. When using go install, in which GOPATH the package is found, the executable file will be generated in the bin directory under which GOPATH.

go runs after writing:

Run as run file

The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly.

Run as run directory

Guess you like

Origin blog.csdn.net/weixin_54061333/article/details/132706787