diff --git a/syntax_checkers/go/go.vim b/syntax_checkers/go/go.vim index d17c64d6..0b8ccbeb 100644 --- a/syntax_checkers/go/go.vim +++ b/syntax_checkers/go/go.vim @@ -23,7 +23,7 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_go_go_IsAvailable() dict - return executable('go') && executable('gofmt') + return executable(self.getExec()) && executable('gofmt') endfunction function! SyntaxCheckers_go_go_GetLocList() dict @@ -50,10 +50,10 @@ function! SyntaxCheckers_go_go_GetLocList() dict " Test files, i.e. files with a name ending in `_test.go`, are not " compiled by `go build`, therefore `go test` must be called for those. if match(expand('%'), '\m_test\.go$') == -1 - let makeprg = 'go build ' . syntastic#c#NullOutput() + let makeprg = self.getExec() . ' build ' . syntastic#c#NullOutput() let cleanup = 0 else - let makeprg = 'go test -c ' . syntastic#c#NullOutput() + let makeprg = self.getExec() . ' test -c ' . syntastic#c#NullOutput() let cleanup = 1 endif diff --git a/syntax_checkers/go/govet.vim b/syntax_checkers/go/govet.vim index c4b7fd93..5194d0b2 100644 --- a/syntax_checkers/go/govet.vim +++ b/syntax_checkers/go/govet.vim @@ -19,11 +19,11 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_go_govet_IsAvailable() dict - return executable('go') + return executable(self.getExec()) endfunction function! SyntaxCheckers_go_govet_GetLocList() dict - let makeprg = 'go vet' + let makeprg = self.getExec() . ' vet' let errorformat = \ '%Evet: %.%\+: %f:%l:%c: %m,' . @@ -43,7 +43,8 @@ endfunction call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'go', - \ 'name': 'govet'}) + \ 'name': 'govet', + \ 'exec': 'go' }) let &cpo = s:save_cpo unlet s:save_cpo