Posts

Showing posts from May, 2017

Setting up debugging environment for gogland

Image
Run -> Edit configurations -> Default -> Go Application Run kind to package Package path to your main src file like main Setup debugging environment by right click project folder -> Build and Run And then create debug icon as shown in the figure

Installing Go Lang

Setting custom GOPATH https://github.com/golang/go/wiki/SettingGOPATH

Useful commands

See the current Go path go env GOPATH Run a single go file go run filename.go build the final go application go build

Installing packages manually

go install: no install location for directory E:\...\...\src outside GOPATH         For more details see: 'go help gopath' Install the defined package automatically Need to check the GOPATH directory first which is complicated.. Make sure that GOPATH is applied to current Go project go get Install the defined package manually Can just call go install github.com/gorilla/mux to install your desire package