Skip to content

Commit 4490a1f

Browse files
jsagerydfatih
authored andcommitted
Fix whitespace and typo (#1201)
* Correct whitespace - Add trailing whitespace in issue template form - Remove superfluous newlines at EOF - Remove superfluous trailing whitespace * Fix typo
1 parent 68f398b commit 4490a1f

26 files changed

+72
-77
lines changed

.github/ISSUE_TEMPLATE.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Write here what's happening and what you're expecting instead of...
44

55
### Steps to reproduce:
66

7-
Please create a reproducible case of your problem. If this step is
7+
Please create a reproducible case of your problem. If this step is
88
not provided, the issue will be **closed**
99

10-
Re produce it with a minimal `vimrc` with all plugins disabled and
10+
Re produce it with a minimal `vimrc` with all plugins disabled and
1111
only `vim-go` enabled:
1212

1313
1.
@@ -20,7 +20,6 @@ Add here your current configuration and additional information that might be
2020
useful, such as:
2121

2222
* `vimrc` you used to reproduce
23-
* vim version:
23+
* vim version:
2424
* vim-go version:
25-
* go version:
26-
25+
* go version:

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ install: |
1919
cd -
2020
2121
script: ./scripts/test.sh
22-

CHANGELOG.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ FEATURES:
8989
you have at least Vim 8.0.0087. Backwards compatible with Vim 7.4.x.
9090
If you see any problems, please open an issue.
9191

92-
* We have now a [logo for vim-go](https://github.com/fatih/vim-go/blob/master/assets/vim-go.png)! Thanks to @egonelbre for his work on this.
92+
* We have now a [logo for vim-go](https://github.com/fatih/vim-go/blob/master/assets/vim-go.png)! Thanks to @egonelbre for his work on this.
9393
* `:GoBuild`, `:GoTest`, `:GoTestCompile`, `:GoInstall` commands are now fully
9494
async. Async means it doesn't block your UI anymore. If the command finished
9595
it echoes the status. For a better experience use the statusline information
@@ -104,7 +104,7 @@ FEATURES:
104104
`:GoMetaLinterAutoSaveToggle` (temporary) or add `let
105105
g:go_metalinter_autosave = 1` (persistent) to your virmc).
106106

107-
* All `guru` commands run asynchronously if Vim 8.0 is being used. Current
107+
* All `guru` commands run asynchronously if Vim 8.0 is being used. Current
108108
Commands:
109109
* GoImplements
110110
* GoWhicherrs
@@ -120,7 +120,7 @@ FEATURES:
120120
auto sameids mode. In this mode it constantly evaluates the identifier under the
121121
cursor whenever it's in hold position and then calls :GoSameIds. As a
122122
reminder, to enable auto info either call `:GoSameIdsAutoToggle`(temporary)
123-
or add `let g:go_auto_sameids = 1` (persistent) to your vimrc.
123+
or add `let g:go_auto_sameids = 1` (persistent) to your vimrc.
124124

125125
* `:GoInfo` is now non blocking and works in async mode if `guru` is used in
126126
`g:go_info_mode`. This makes it useful especially for autoinfo mode. In this
@@ -230,7 +230,7 @@ FEATURES:
230230
* The snippet expansion `json` is now much more smarter. It pre populates the placeholder according to the first word and it also applies `snake_case` or `camelCase` conversion. Together with `:GoAddTags` it gives `vim-go` users flexible ways of populating a field tag. Checkout the demo to see it in action: https://twitter.com/fatih/status/754477622042689536 [gh-927]
231231
* New **`:GoSameIds`** command. When called highlights all same identifiers in the current file. Can be also enabled to highlight identifiers automatically (with `:GoSameIdsAutoToggle` or `g:go_auto_sameids`). Checkout the demo to see it in action: https://twitter.com/fatih/status/753673709278339072. [gh-936]
232232
* New **`:GoWhicherrs`** command. It shows all possible values of the selected error variable. [gh-948]
233-
* Add new `errp` snippet to expand an `if err != nil { panic() }` clause [gh-926]
233+
* Add new `errp` snippet to expand an `if err != nil { panic() }` clause [gh-926]
234234
* If you open a new buffer with a Go filename it get automatically populated based on the directory. If there are no Go files a simple main package is created, otherwise the file will include the package declaration line based on the package in the current directory. Checkout the demo to see it in action: https://twitter.com/fatih/status/748333086643994624. This is enabled by default. Can be disabled with `let g:go_template_autocreate = 0`. You can use your own template with `let g:go_template_file = "foo.go"` and putting the file under the `templates/` folder. [gh-918]
235235
* Added new toggle commands to enable/disable feature that run for your
236236
automatic. For example if you have `let g:go_auto_type_info = 1` enabled, you
@@ -380,4 +380,3 @@ BACKWARDS INCOMPATIBILITIES:
380380
## Previous releases
381381

382382
Previous changelogs can be found here: https://github.com/fatih/vim-go/releases
383-

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2525
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2626
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28-
28+
2929
This software includes some portions from Go. Go is used under the terms of the
3030
BSD like license.
3131

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# vim-go [![Build Status](http://img.shields.io/travis/fatih/vim-go.svg?style=flat-square)](https://travis-ci.org/fatih/vim-go)
1+
# vim-go [![Build Status](http://img.shields.io/travis/fatih/vim-go.svg?style=flat-square)](https://travis-ci.org/fatih/vim-go)
22

33
<p align="center">
44
<img style="float: right;" src="assets/vim-go.png" alt="Vim-go logo"/>
@@ -235,9 +235,9 @@ let g:go_get_update = 0
235235
### Using with Neovim (beta)
236236

237237
Note: Neovim currently is not a first class citizen for vim-go. You are free
238-
to open bug, however I'm not using Neovim so it's hard for me to test it.
239-
vim-go might not work well as good as in Vim. I'm happy to accept pull requests
240-
or very detailed bug reports. If you're interested to improve the state of
238+
to open bug, however I'm not using Neovim so it's hard for me to test it.
239+
vim-go might not work well as good as in Vim. I'm happy to accept pull requests
240+
or very detailed bug reports. If you're interested to improve the state of
241241
Neovim in vim-go you're always welcome!
242242

243243

autoload/ctrlp/decls.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function! ctrlp#decls#accept(mode, str) abort
3939
let vals = matchlist(a:str, '|\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)|')
4040

4141
" i.e: main.go
42-
let filename = vals[1]
42+
let filename = vals[1]
4343
let line = vals[2]
4444
let col = vals[3]
4545

@@ -119,7 +119,7 @@ function! ctrlp#decls#enter() abort
119119
let space .= " "
120120
endfor
121121

122-
call add(s:decls, printf("%s\t%s |%s:%s:%s|\t%s",
122+
call add(s:decls, printf("%s\t%s |%s:%s:%s|\t%s",
123123
\ decl.ident . space,
124124
\ decl.keyword,
125125
\ fnamemodify(decl.filename, ":t"),
@@ -135,7 +135,7 @@ function! s:enable_syntax() abort
135135
return
136136
endif
137137

138-
syntax match CtrlPIdent '\zs\h\+\ze\s'
138+
syntax match CtrlPIdent '\zs\h\+\ze\s'
139139
syntax match CtrlPKeyword '\zs[^\t|]\+\ze|[^|]\+:\d\+:\d\+|'
140140
syntax match CtrlPFilename '|\zs[^|]\+:\d\+:\d\+\ze|'
141141
syntax match CtrlPSignature '\zs\t.*\ze$' contains=CtrlPKeyWord,CtrlPFilename

autoload/go/cmd.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ function! go#cmd#Generate(bang, ...) abort
373373

374374
let errors = go#list#Get(l:listtype)
375375
call go#list#Window(l:listtype, len(errors))
376-
if !empty(errors)
376+
if !empty(errors)
377377
if !a:bang
378378
call go#list#JumpToFirst(l:listtype)
379379
endif

autoload/go/complete.vim

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ function! s:gocodeCommand(cmd, preargs, args) abort
2727
let $GOROOT = go#util#env("goroot")
2828

2929
let socket_type = get(g:, 'go_gocode_socket_type', s:sock_type)
30-
let cmd = printf('%s -sock %s %s %s %s',
31-
\ go#util#Shellescape(bin_path),
32-
\ socket_type,
33-
\ join(a:preargs),
34-
\ go#util#Shellescape(a:cmd),
30+
let cmd = printf('%s -sock %s %s %s %s',
31+
\ go#util#Shellescape(bin_path),
32+
\ socket_type,
33+
\ join(a:preargs),
34+
\ go#util#Shellescape(a:cmd),
3535
\ join(a:args)
3636
\ )
3737

@@ -55,7 +55,7 @@ endfunction
5555

5656
let s:optionsEnabled = 0
5757
function! s:gocodeEnableOptions() abort
58-
if s:optionsEnabled
58+
if s:optionsEnabled
5959
return
6060
endif
6161

autoload/go/coverage.vim

+11-11
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function! go#coverage#Buffer(bang, ...) abort
3434
try
3535
execute cd . fnameescape(expand("%:p:h"))
3636
if empty(glob("*_test.go"))
37-
call go#util#EchoError("no tests files available")
37+
call go#util#EchoError("no test files available")
3838
return
3939
endif
4040
finally
@@ -89,8 +89,8 @@ function! go#coverage#Clear() abort
8989

9090
if exists("s:toggle") | let s:toggle = 0 | endif
9191

92-
" remove the autocmd we defined
93-
if exists("#BufWinLeave#<buffer>")
92+
" remove the autocmd we defined
93+
if exists("#BufWinLeave#<buffer>")
9494
autocmd! BufWinLeave <buffer>
9595
endif
9696
endfunction
@@ -160,8 +160,8 @@ function! go#coverage#genmatch(cov) abort
160160
" example: foo.go:92.2,92.65 1 0
161161
if a:cov.startline == a:cov.endline
162162
call add(matches, {
163-
\ 'group': color,
164-
\ 'pos': [[a:cov.startline, a:cov.startcol, a:cov.endcol - a:cov.startcol]],
163+
\ 'group': color,
164+
\ 'pos': [[a:cov.startline, a:cov.startcol, a:cov.endcol - a:cov.startcol]],
165165
\ 'priority': 2,
166166
\ })
167167
return matches
@@ -171,8 +171,8 @@ function! go#coverage#genmatch(cov) abort
171171
" the line, we assume it is at maximum 200 bytes. I know this is hacky,
172172
" but that's only way of fixing the issue
173173
call add(matches, {
174-
\ 'group': color,
175-
\ 'pos': [[a:cov.startline, a:cov.startcol, 200]],
174+
\ 'group': color,
175+
\ 'pos': [[a:cov.startline, a:cov.startcol, 200]],
176176
\ 'priority': 2,
177177
\ })
178178

@@ -181,16 +181,16 @@ function! go#coverage#genmatch(cov) abort
181181
while start_line < a:cov.endline
182182
let start_line += 1
183183
call add(matches, {
184-
\ 'group': color,
185-
\ 'pos': [[start_line]],
184+
\ 'group': color,
185+
\ 'pos': [[start_line]],
186186
\ 'priority': 2,
187187
\ })
188188
endwhile
189189

190190
" finally end columns
191191
call add(matches, {
192-
\ 'group': color,
193-
\ 'pos': [[a:cov.endline, a:cov.endcol-1]],
192+
\ 'group': color,
193+
\ 'pos': [[a:cov.endline, a:cov.endcol-1]],
194194
\ 'priority': 2,
195195
\ })
196196

autoload/go/def.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function! go#def#StackUI() abort
209209
let prefix = " "
210210
endif
211211

212-
call add(stackOut, printf("%s %d %s|%d col %d|%s",
212+
call add(stackOut, printf("%s %d %s|%d col %d|%s",
213213
\ prefix, i+1, entry["file"], entry["line"], entry["col"], entry["ident"]))
214214
let i += 1
215215
endwhile

autoload/go/doc.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ function! go#doc#OpenBrowser(...) abort
3232
let import = out["import"]
3333
let name = out["name"]
3434
let decl = out["decl"]
35-
35+
3636
let godoc_url = "https://godoc.org/" . import
3737
if decl !~ "^package"
38-
let godoc_url .= "#" . name
38+
let godoc_url .= "#" . name
3939
endif
4040

4141
echo godoc_url

autoload/go/fmt.vim

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function! go#fmt#Format(withGoimport) abort
102102
endfunction
103103

104104
" update_file updates the target file with the given formatted source
105-
function! go#fmt#update_file(source, target)
105+
function! go#fmt#update_file(source, target)
106106
" remove undo point caused via BufWritePre
107107
try | silent undojoin | catch | endtry
108108

@@ -133,8 +133,8 @@ endfunction
133133

134134
" run runs the gofmt/goimport command for the given source file and returns
135135
" the the output of the executed command. Target is the real file to be
136-
" formated.
137-
function! go#fmt#run(bin_name, source, target)
136+
" formated.
137+
function! go#fmt#run(bin_name, source, target)
138138
let cmd = s:fmt_cmd(a:bin_name, a:source, a:target)
139139
if cmd[0] == "goimports"
140140
" change GOPATH too, so goimports can pick up the correct library
@@ -218,13 +218,13 @@ endfunction
218218
" show_errors opens a location list and shows the given errors. If the given
219219
" errors is empty, it closes the the location list
220220
function! s:show_errors(errors) abort
221-
let l:listtype = "locationlist"
221+
let l:listtype = "locationlist"
222222
if !empty(a:errors)
223223
call go#list#Populate(l:listtype, a:errors, 'Format')
224224
echohl Error | echomsg "Gofmt returned error" | echohl None
225225
endif
226226

227-
" this closes the window if there are no errors or it opens
227+
" this closes the window if there are no errors or it opens
228228
" it if there is any
229229
call go#list#Window(l:listtype, len(a:errors))
230230
endfunction

autoload/go/guru.vim

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function! s:guru_cmd(args) range abort
2525
endif
2626

2727
"return with a warning if the binary doesn't exist
28-
let bin_path = go#path#CheckBinPath("guru")
28+
let bin_path = go#path#CheckBinPath("guru")
2929
if empty(bin_path)
3030
return {'err': "bin path not found"}
3131
endif
@@ -41,7 +41,7 @@ function! s:guru_cmd(args) range abort
4141
endif
4242

4343
" enable outputting in json format
44-
if format == "json"
44+
if format == "json"
4545
call add(cmd, "-json")
4646
endif
4747

@@ -270,7 +270,7 @@ endfunction
270270
function! go#guru#DescribeInfo() abort
271271
" json_encode() and friends are introduced with this patch (7.4.1304)
272272
" vim: https://groups.google.com/d/msg/vim_dev/vLupTNhQhZ8/cDGIk0JEDgAJ
273-
" nvim: https://github.com/neovim/neovim/pull/4131
273+
" nvim: https://github.com/neovim/neovim/pull/4131
274274
if !exists("*json_decode")
275275
call go#util#EchoError("requires 'json_decode'. Update your Vim/Neovim version.")
276276
return
@@ -465,7 +465,7 @@ function! go#guru#SameIds() abort
465465

466466
" json_encode() and friends are introduced with this patch (7.4.1304)
467467
" vim: https://groups.google.com/d/msg/vim_dev/vLupTNhQhZ8/cDGIk0JEDgAJ
468-
" nvim: https://github.com/neovim/neovim/pull/4131
468+
" nvim: https://github.com/neovim/neovim/pull/4131
469469
if !exists("*json_decode")
470470
call go#util#EchoError("GoSameIds requires 'json_decode'. Update your Vim/Neovim version.")
471471
return
@@ -547,7 +547,7 @@ function! go#guru#ClearSameIds() abort
547547
endfunction
548548

549549
function! go#guru#ToggleSameIds() abort
550-
if len(getmatches()) != 0
550+
if len(getmatches()) != 0
551551
call go#guru#ClearSameIds()
552552
else
553553
call go#guru#SameIds()

autoload/go/impl.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function! go#impl#Impl(...) abort
1818
return
1919
endif
2020
elseif a:0 == 1
21-
" we assume the user only passed the interface type,
21+
" we assume the user only passed the interface type,
2222
" i.e: ':GoImpl io.Writer'
2323
let receiveType = expand("<cword>")
2424
let recv = printf("%s *%s", tolower(receiveType)[0], receiveType)
@@ -44,7 +44,7 @@ function! go#impl#Impl(...) abort
4444
end
4545

4646
let pos = getpos('.')
47-
put =''
47+
put =''
4848
put =result
4949
call setpos('.', pos)
5050
endfunction

autoload/go/lint.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ endfunction
109109
" Golint calls 'golint' on the current directory. Any warnings are populated in
110110
" the location list
111111
function! go#lint#Golint(...) abort
112-
let bin_path = go#path#CheckBinPath(g:go_golint_bin)
113-
if empty(bin_path)
114-
return
112+
let bin_path = go#path#CheckBinPath(g:go_golint_bin)
113+
if empty(bin_path)
114+
return
115115
endif
116116

117117
if a:0 == 0
@@ -280,7 +280,7 @@ function s:lint_job(args)
280280
call go#statusline#Update(status_dir, status)
281281

282282
let errors = go#list#Get(l:listtype)
283-
if empty(errors)
283+
if empty(errors)
284284
call go#list#Window(l:listtype, len(errors))
285285
elseif has("patch-7.4.2200")
286286
if l:listtype == 'quickfix'

autoload/go/list.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function! go#list#Type(listtype) abort
124124
if g:go_list_type == "locationlist"
125125
return "locationlist"
126126
elseif g:go_list_type == "quickfix"
127-
return "quickfix"
127+
return "quickfix"
128128
else
129129
return a:listtype
130130
endif

autoload/go/play.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function! s:get_visual_selection() abort
7070
return join(lines, "\n")
7171
endfunction
7272

73-
" following two functions are from: https://github.com/mattn/gist-vim
73+
" following two functions are from: https://github.com/mattn/gist-vim
7474
" thanks @mattn
7575
function! s:get_browser_command() abort
7676
let go_play_browser_command = get(g:, 'go_play_browser_command', '')

autoload/go/statusline.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" s:statuses is a global reference to all statuses. It stores the statuses per
55
" import paths (map[string]status), where each status is unique per its
66
" type. Current status dict is in form:
7-
" {
7+
" {
88
" 'desc' : 'Job description',
99
" 'state' : 'Job state, such as success, failure, etc..',
1010
" 'type' : 'Job type, such as build, test, etc..'

0 commit comments

Comments
 (0)