fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
15.95k stars 1.45k forks source link

There is a way to pass custom args to `GoCoverage`? #2359

Closed guilhermehubner closed 5 years ago

guilhermehubner commented 5 years ago

What did you do?

:GoCoverage

What did you expect to happen?

I am using a mock library called gomonkey (https://github.com/agiledragon/gomonkey/) and it's requires a arg to go test to work correctly; In this case the arg is -gcflags=all=-l.

I would like to know if it is possible to pass this arg when I use GoCoverage command.

What happened instead?

The tests fail :sob:

Configuration (MUST fill this out):

vim-go version:

1.20 (3dba44e24526f05ed487d3267a7996bd6b511893)

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

vimrc

Vim version (first three lines from :version):

NVIM v0.3.7 Build type: Release LuaJIT 2.1.0-beta3

Go version (go version):

go version go1.12.4 linux/amd64

Go environment

go env Output:


bhcleek commented 5 years ago

Yes, :GoCoverage supports passing options to go test. See :help :GoCoverage.

guilhermehubner commented 5 years ago

@bhcleek it's works! Thank you so much!