title: Godef not being found in a go-mode emacs session
body: <p>I have godef installed via</p>
  
  <pre><code>go get github.com/rogpeppe/godef
  </code></pre>
  
  <p>I have emacs go-mode installed, and the following exports in my .bashrc:</p>
  
  <pre><code>export GOROOT=/usr/local/go
  export GOPATH=$HOME/go
  export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
  </code></pre>
  
  <p>godef is found in the sense that </p>
  
  <pre><code>godef -h # appears to work.
  </code></pre>
  
  <p>As in:</p>
  
  <pre><code>$ godef -h
  usage: godef [flags] [expr]
    -A    print all type and members information
    -a    print public type and member information
    -acme
          use current acme window
    -debug
          debug mode
    -f string
          Go source filename
    -i    read file from stdin
    -json
          output location in JSON format (-t flag is ignored)
    -o int
          file offset of identifier in stdin (default -1)
    -t    print type information
  </code></pre>
  
  <p>When I run <code>C-c C-d</code> in a file in my emacs session, which should be calling a <code>godef-describe</code> function per</p>
  
  <p><a href="https://github.com/dominikh/go-mode.el" rel="nofollow noreferrer">https://github.com/dominikh/go-mode.el</a></p>
  
  <p>I expect:</p>
  
  <pre><code>Integration with godef
  
      godef-describe (C-c C-d) to describe expressions
      godef-jump (C-c C-j) and godef-jump-other-window (C-x 4 C-c C-j) to jump to declarations
      This requires you to install godef via go get github.com/rogpeppe/godef.
  </code></pre>
  
  <p>Cool, all set. But when I try to use C-c C-d in a go file, I get:</p>
  
  <pre><code>Could not run godef binary
  </code></pre>
  
  <p>I can run it on the command line, and it appears properly defined.  What's happening?</p>
  
  <p>I find:</p>
  
  <pre><code>M-x godoc
  
  // then
  godoc: OSReadDir // for example
  </code></pre>
  
  <p>Produces</p>
  
  <pre><code>godoc: /bin/bash: go: command not found
  </code></pre>
  
  <p>Which suggests to me that even though godef and godoc are found in an ordinary shell, there may be some path issue within emacs?  How can I check or fix?</p>