You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:GoImports works, or at least gives an error message that is correct.
Steps to reproduce:
Run :GoImports
Environment
This is on OSX El Capitan 10.11.6 and is not in a Tmux session (but it also occurs there).
: echo system("goimports --help")
usage: goimports [flags] [path ...]
-cpuprofile string
CPU profile output
-d display diffs instead of rewriting files
-e report all errors (not just the first 10 on different lines)
-l list files whose formatting differs from goimport's
-local string
put imports beginning with this string after 3rd-party packages
-memprofile string
memory profile output
-memrate int
if > 0, sets runtime.MemProfileRate
-srcdir dir
choose imports as if source code is from dir. When operating on a single
file, dir may instead be the complete file name.
-trace string
trace profile output
-v verbose logging
-w write result to (source) file instead of stdout
Press ENTER or type command to continue
:echo system("which goimports")
/Users/alaska/go/bin/goimports
Press ENTER or type command to continue
And, from the terminal:
$ which goimports
/Users/alaska/go/bin/goimports
The text was updated successfully, but these errors were encountered:
The error is correct. This was occurring in a different gopath that had an old copy of goimports sticking around in $GOPATH/bin. However, the debugging steps given in #775 were inadequate. It would be better to check which binary is being used with
:echo go#path#CheckBinPath("goimports")
That revealed the issue, and removing the old binary fixed the problem.
Recommendations
put the full path of the binary in the error message to make this clear.
Actual behavior
:GoImports
results invim-go: vim-go: goimports does not support srcdir. update with: :GoUpdateBinaries
But the version I have supports this.
Possible dup of closed issue #775
Expected behavior
:GoImports
works, or at least gives an error message that is correct.Steps to reproduce:
Run
:GoImports
Environment
This is on OSX El Capitan 10.11.6 and is not in a Tmux session (but it also occurs there).
: echo system("goimports --help")
:echo system("which goimports")
And, from the terminal:
The text was updated successfully, but these errors were encountered: