a)
Create workspace directory structure
$mkdir mygoproject
$cd mygoproject
$mkdir bin
$mkdir src
$mkdir pkg
b)
Export path of workspace and bin directory.
$export GOPATH=$HOME/golang_tuto/mygoproject
$export PATH=$GOPATH/bin:$PATH
c)
Install dependency packages in workspace:
$go get github.com/gorilla/mux
$go get -u golang.org/x/crypto/bcrypt
$go get golang.org/x/tools/cmd/goimports
d)
Then check bin, src and pkg directories fo workspace.
$ls mygoproject/bin
$ls mygoproject/src
$ls mygoproject/pkg
Create workspace directory structure
$mkdir mygoproject
$cd mygoproject
$mkdir bin
$mkdir src
$mkdir pkg
b)
Export path of workspace and bin directory.
$export GOPATH=$HOME/golang_tuto/mygoproject
$export PATH=$GOPATH/bin:$PATH
c)
Install dependency packages in workspace:
$go get github.com/gorilla/mux
$go get -u golang.org/x/crypto/bcrypt
$go get golang.org/x/tools/cmd/goimports
d)
Then check bin, src and pkg directories fo workspace.
$ls mygoproject/bin
$ls mygoproject/src
$ls mygoproject/pkg
No comments:
Post a Comment