0

When I run godep save ./... from the root directory of the project I'm getting the following error. Any clues what might I have to fix?

godep: Unable to find SrcRoot for package .

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Pubudu
  • 478
  • 1
  • 6
  • 22

1 Answers1

0

Filesystem location matters a lot in Go. You’re expected to be running things from a designated ‘gopath’, but don’t confuse gopath with the location of go (don’t just set it to where go is installed).

Your gopath should be a location that you’re happy to put your go source code for the foreseeable future. I’ve set mine to /Users/ejiro/go.

cat <<END >> ~/.bashrc

export GOPATH=/Users/ejiro/go

END
U13-Forward
  • 69,221
  • 14
  • 89
  • 114