Thursday 11 June 2020

Compiling GoLang application

When using Golang basic setup need to be done to able compile all application based on golang in github.

To do that install golang then set in your home directory.

let say /home/geek/go/

inside the folder create a src folder, and put all the go app you want to compile.

Then remember to set env variable GOPATH.

in ~/.bashrc set :

GOPATH = /home/geek/go

Example you have a killer-app download from github with go source code.
Put it inside /home/geek/go/src/killer-app/

Then do this :

$ cd /home/geek/go/src/killer-app/
$ go get ./...
$ go build

Then there will be a file created from the compile called killer-app 

Then profit.


0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More