Thank you, I'm also new to go so figuring this out as I go.
It looks like it's not in path, I will take a look in a bit:
user@ubuntu17:~/code/beats$ go
The program 'go' can be found in the following packages:
* golang-go
* gccgo-go
Try: sudo apt install <selected package>
But now I had a brand new problem, how do I get '/bin/gotestcover' for the unit tests:
user@ubuntu17:~/code/beats$ make
make[1]: Entering directory '/home/user/code/beats/libbeat'
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/user/code/beats/libbeat/build/python-env/bin/python2
Also creating executable in /home/user/code/beats/libbeat/build/python-env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
Updating generated files for libbeat
cat: _meta/beat.yml: No such file or directory
cat: _meta/beat.yml: No such file or directory
make[2]: Entering directory '/home/user/code/beats/libbeat'
make[2]: Leaving directory '/home/user/code/beats/libbeat'
-- The index pattern was created under /home/user/code/beats/libbeat/_meta/kibana/5/index-pattern/libbeat.json
-- The index pattern was created under /home/user/code/beats/libbeat/_meta/kibana/6/index-pattern/libbeat.json
make unit-tests
make[2]: Entering directory '/home/user/code/beats/libbeat'
mkdir -p /home/user/code/beats/libbeat/build/coverage
# gotestcover is needed to fetch coverage for multiple packages
go get github.com/elastic/beats/vendor/github.com/pierrre/gotestcover
# testify is needed for unit and integration tests
go get github.com/elastic/beats/vendor/github.com/stretchr/testify/assert
# libcompose is needed for integration tests
go get github.com/docker/libcompose
go test -i github.co.....bbeat/version
/bin/gotestcover -coverprofile=/hom......bbeat/version
bash: /bin/gotestcover: No such file or directory
scripts/Makefile:164: recipe for target 'unit-tests' failed
make[2]: *** [unit-tests] Error 127
make[2]: Leaving directory '/home/user/code/beats/libbeat'
scripts/Makefile:249: recipe for target 'testsuite' failed
make[1]: *** [testsuite] Error 2
make[1]: Leaving directory '/home/user/code/beats/libbeat'
Makefile:21: recipe for target 'testsuite' failed
make: *** [testsuite] Error 1
Which I fixed with:
go get github.com/powerman/gotestcover
sudo ln -s /home/user/go/bin/gotestcover /bin/gotestcover
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.