S
S
Sergey2017-08-31 01:19:38
linux
Sergey, 2017-08-31 01:19:38

How to setup godep?

I want to run this script: https://github.com/recursionpharma/anonymous-slack
1. On a clean ubuntu I do apt-get install golang-go
2. I clone the repository in /home/username - git clone https:// github.com/recursionpharma/anonymous-slack.git
3. cd to anonymous-slack
4. export GOPATH=/home/username/anonymous-slack
5. put godep go get github.com/tools/godep
6. And here I'm trying to do godep save -r (but it's not there and nothing works), so I do ./bin/godep save -r and see:

godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]: Current Directory: /home/username/anonymous-slack
godep: [WARNING]: $GOPATH: /home/username/anonymous-slack/
godep: flag -r is incompatible with the vendoring experiment
Args: godep save [-v] [-d] [-r] [-t] [packages]
Run 'godep help save' for help.

What am I doing wrong?
It seems like ubunta installed go in /usr/local/go but if I gopath to that directory there is even worse hell with permissions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeniy Ivakha, 2017-09-07
@ivahaev

It says You are probably outside of your $ GOPATH . The project must be in $GOPATH .
For example, github.com/tools/godep would be /home/username/anonymous-slack/src/github.com/tools/godep .
In general, you should already use the almost official tool:
https://github.com/golang/dep

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question