I ran this:
cd $GOPATH && go get -u github.com/zricethezav/gitleaks
perplexingly, I now have this:
$GOPATH/
src/
github.com/
gitleaks/
but there is not a bin/
folder ... I would have expected to see the bin folder here: $GOPATH/bin
did I do something wrong? How do I install the package so that the binary shows up? I tried running:
go install github.com/zricethezav/gitleaks
but after installing I don't see a bin/
folder...
The output of go env
looks like:
GOARCH="amd64"
GOBIN="/Users/alex/go/bin"
GOCACHE="/Users/alex/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/alex/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/st/159q4vsd64b69_x99dtzzt6m0000gn/T/go-build133179815=/tmp/go-build -gno-record-gcc-switches -fno-common"
If $GOPATH isn't go's root directory I think you have to create bin folder manually. I've manually created $GOPATH/bin folder and its working fine.