Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with running nflow-generator in go #5

Open
idanbenyair opened this issue Apr 1, 2019 · 7 comments
Open

Issue with running nflow-generator in go #5

idanbenyair opened this issue Apr 1, 2019 · 7 comments

Comments

@idanbenyair
Copy link

Hello,

Thanks a lot for this cool generator! I use it a lot. Works great. I use the docker container. But now I have a requirement to use the go version. I am facing this issue (I'm pretty sure I am doing something wrong):

root@kafka-west-209-107:/home/ubuntu/nflow-generator# go build
nflow_logging.go:4:2: cannot find package "github.com/Sirupsen/logrus" in any of:
/usr/lib/go-1.6/src/github.com/Sirupsen/logrus (from $GOROOT)
/root/Sirupsen/logrus/src/github.com/Sirupsen/logrus (from $GOPATH)
nflow-generator.go:10:2: cannot find package "github.com/jessevdk/go-flags" in any of:
/usr/lib/go-1.6/src/github.com/jessevdk/go-flags (from $GOROOT)
/root/Sirupsen/logrus/src/github.com/jessevdk/go-flags (from $GOPATH)


What should I do per the exports?

@nerdalert
Copy link
Owner

nerdalert commented Apr 5, 2019

Hey Idan!

You just need to pull down the libraries used in the code and cache them on your local machine.

go get github.com/Sirupsen/logrus
go get github.com/jessevdk/go-flags

I did a quick example to showing how to resolve it.

brent@ub-230:~/nflow-generator$ ls
Dockerfile  LICENSE  nflow-generator.go  nflow_logging.go  nflow_payload.go  nflow_spike.go  README.md
brent@ub-230:~/nflow-generator$ go build
nflow_logging.go:4:2: cannot find package "github.com/Sirupsen/logrus" in any of:
	/usr/local/go/src/github.com/Sirupsen/logrus (from $GOROOT)
	/home/brent/go/src/github.com/Sirupsen/logrus (from $GOPATH)
nflow-generator.go:10:2: cannot find package "github.com/jessevdk/go-flags" in any of:
	/usr/local/go/src/github.com/jessevdk/go-flags (from $GOROOT)
	/home/brent/go/src/github.com/jessevdk/go-flags (from $GOPATH)
brent@ub-230:~/nflow-generator$ go get github.com/Sirupsen/logrus
brent@ub-230:~/nflow-generator$ go get github.com/jessevdk/go-flags
brent@ub-230:~/nflow-generator$ go build
brent@ub-230:~/nflow-generator$ ls
Dockerfile  LICENSE  nflow-generator  nflow-generator.go  nflow_logging.go  nflow_payload.go  nflow_spike.go  README.md

I also added a binary to download the Linux binary here nflow-generator-x86_64-linux

Let me know if this unblocks you. Thanks!

@idanbenyair
Copy link
Author

idanbenyair commented Apr 8, 2019 via email

@nerdalert
Copy link
Owner

Heya! Trying upgrading to Go v1.7+. https://stackoverflow.com/questions/42802278/install-context-package-in-golang

Regarding the binary, just download and give chmod +x status and you are good to go on a Linux host.

Cheers!

@idanbenyair
Copy link
Author

idanbenyair commented Apr 8, 2019 via email

@idanbenyair
Copy link
Author

idanbenyair commented Apr 8, 2019 via email

@idanbenyair
Copy link
Author

idanbenyair commented Apr 9, 2019 via email

@idanbenyair
Copy link
Author

idanbenyair commented Apr 10, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants