Custom Search

Tuesday, May 16, 2017

go Golang How to create workspace for a project

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)
Test workspace by installing a package from github:

$go get github.com/gorilla/mux
 

No comments:

Post a Comment