Custom Search

SUBSCRIBE

SUBSCRIBE : 300 + Free Video Tutorials Programming (Python, golang, Julia), DevOps

Tuesday, May 16, 2017

Golang Go Programming Setup GOPATH and install package

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 github.com/gorilla/mux

d)
Then check bin, src and pkg directories fo workspace.
$ls mygoproject/bin
$ls mygoproject/src
$ls mygoproject/pkg

No comments:

Post a Comment