Expected outcome:
a new binary appears in either cwd or in ~/go/bin/
Seen:
main.go:7:2: cannot find package "github.com/banzaicloud/aws-autoscaling-exporter/exporter" in any of:
/opt/go/src/github.com/banzaicloud/aws-autoscaling-exporter/exporter (from $GOROOT)
/home/moses/go/src/github.com/banzaicloud/aws-autoscaling-exporter/exporter (from $GOPATH)
main.go:8:2: cannot find package "github.com/prometheus/client_golang/prometheus" in any of:
/opt/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT)
/home/moses/go/src/github.com/prometheus/client_golang/prometheus (from $GOPATH)
main.go:9:2: cannot find package "github.com/prometheus/client_golang/prometheus/promhttp" in any of:
/opt/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOROOT)
/home/moses/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOPATH)
main.go:10:2: cannot find package "github.com/sirupsen/logrus" in any of:
/opt/go/src/github.com/sirupsen/logrus (from $GOROOT)
/home/moses/go/src/github.com/sirupsen/logrus (from $GOPATH)
prometheus/client_golang/prometheus is probably a given, but you should at least mention that sirupsen/logrus should be installed and built first. It would help novices if you briefly described how to install and build the prereqs.
Building the project is as simple as running a go build command. The result is a statically linked executable binary.
go build .
I believe you forgot to mention requirements, steps to perform before this instruction.
Steps to reproduce: $ go version go version go1.11.4 linux/amd64 $ git clone https://github.com/banzaicloud/aws-autoscaling-exporter.git $ cd aws-autoscaling-exporter/ $ go build .
Expected outcome: a new binary appears in either cwd or in ~/go/bin/
Seen:
prometheus/client_golang/prometheus is probably a given, but you should at least mention that sirupsen/logrus should be installed and built first. It would help novices if you briefly described how to install and build the prereqs.