diff --git a/autoload/go/fmt.vim b/autoload/go/fmt.vim index 380034f136..cd1245607d 100644 --- a/autoload/go/fmt.vim +++ b/autoload/go/fmt.vim @@ -58,7 +58,7 @@ function! go#fmt#Format(withGoimport) abort endif " Write current unsaved buffer to a temp file - let l:tmpname = tempname() + let l:tmpname = tempname() . '.go' call writefile(go#util#GetLines(), l:tmpname) if go#util#IsWin() let l:tmpname = tr(l:tmpname, '\', '/')