This is a creation in Article, where the information may have evolved or changed.
Drwxr-xr-x 4 B Staff 136 APR 23:28 SRC
Drwxr-xr-x B Staff 510 APR 23:00 Web
Drwxr-xr-x 4 B Staff 136 APR 23:24 Web.go
-rw-r--r--1 B Staff 434 Mar 19:34 Xiec.go
The go package you choose will be installed under the Gopath according to the entire path, if it is from GitHub down to the assembly, take this as an example
Go get Github.com/astaxie/beego
You will find the following path in the self-directory.
Golang/src/github.com/astaxie
gaoling/src/golang.org/-------
Here is a step to create a workspace:
Create the $HOME/mygo directory and the SRC directory as the source code.
mkdir$HOME# create a place to put source code
The next step is to set up Gopath, and you should put the bin directory under this directory in the PATH environment variable so that you can execute directly at the command line without giving the full directory.
export GOPATH=$HOMEexport PATH=$PATH:$HOME/mygo/bin
The benefit of the following export path is that you can directly consume Mygo under the compiled Bin directive, and I see that there is actually no bin directory
gopath=/home/ user/gocode/home/ user/gocode/ src/foo/b ar/(Go code in package bar) x.go quux/(Go code in package Main) y.go Bin/quux (installed command) pkg/linux_amd64/ FOO/BAR.A (Installed package Object )
Create these directories manually
==
Mycode/golang/bin
You need to build the bin directory and then pkg to generate the file