Trouble shooting bash script, managed by go.
go get github.com/prometheus/client_golang/prometheus
go get github.com/prometheus/client_golang/prometheus/promauto
go get github.com/prometheus/client_golang/prometheus/promhttp
go get -u github.com/gorilla/mux
go get gopkg.in/yaml.v2
mkdir -p scratch && cd scratch
git clone https://github.com/mchirico/go_script.git
cd go_script
go mod init
go build ./cmd/script
# Yes, run this twice to create script file.
./script
./script
# Want to run tests?
go build ./...
go test ./...
mkdir -p scratch && cd scratch
git clone https://github.com/mchirico/go_script.git
cd go_script
export GO111MODULE=on
go mod init
# Below will put all packages in a vendor folder
go mod vendor
go test -v -mod=vendor ./...
# Don't forget the "." in "./cmd/script" below
go build -v -mod=vendor ./cmd/script
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
go build -o scriptLinux github.com/mchirico/go_script/cmd/script
$GOOS $GOARCH
darwin 386 – 32 bit MacOSX
darwin amd64 – 64 bit MacOSX
freebsd 386
freebsd amd64
linux 386 – 32 bit Linux
linux amd64 – 64 bit Linux
linux arm – RISC Linux
netbsd 386
netbsd amd64
openbsd 386
openbsd amd64
plan9 386
windows 386 – 32 bit Windows
windows amd64 – 64 bit Windows