How to add dependency to godep.json?

Viewed 571

I'm having hard time to add a dependency to the Godeps.json file. I think I've messed up the GOPATH. I tried various suggestions on the warnings but none of them worked for me. My GOPATH is /Users/sarath/project. which go is /usr/local/bin/go. If I try to do godep save ./..., it is giving me the following warning:

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: /Users/sarath/project
godep: [WARNING]:   $GOPATH: /Users/sarath/project
godep: Unable to find SrcRoot for package .

I have my pkg inside the /Users/sarath/project.

1 Answers
Related