slackhq/go-audit

go-audit build issue

HLD opened this issue · 5 comments

HLD commented
  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Description

Build of go-audit not successful due to go path issues.

Troubleshooting path issue, I attempted to use 'go get' but this failed with
error 177: undefined: user.LookupGroup

Reproducible in:

go-audit version:
OS version(s): CentOS 7

Steps to reproduce:

$ go get github.com/slackhq/go-audit

pwd
/home/user/go/src/github.com/slackhq/go-audit
[user@localhost go-audit]$ make
govendor sync
go build
# github.com/slackhq/go-audit
./audit.go:177: undefined: user.LookupGroup
make: *** [bin] Error 2

Expected result:

Actual result:

./audit.go:177: undefined: user.LookupGroup

Attachments:

e.g. Logs, screenshots, screencast, sample project, funny gif, etc.

What version of go are you using?

HLD commented

The wrong version :) Thanks.
go version go1.6.3 linux/amd64
I've follwed the digital ocean guide to install 1.7 on CentOS 7, but I still see 1.6.3 when I run go version.

Pretty sure user.LookupGroup was introduced in v1.7 so you will need to upgrade to that before it will compile.

HLD commented

Appreciated.
Go upgraded to 1.7, some flailing underway getting govendor to work.

HLD commented

Success. Thanks again @nbrownus

  • Not sure if this is specific to my setup, but I had to clone the go-audit project into my $GOPATH/src directory for it to build.
  • Some issues getting govendor to work were helped with this stackoverflow on govendor config