docgen
This commit is contained in:
parent
f157e53753
commit
e387749162
1 changed files with 5 additions and 8 deletions
|
|
@ -160,14 +160,14 @@ Example:
|
||||||
gotests is utilizing the `gotests` tool to generate unit tests boilerplate.
|
gotests is utilizing the `gotests` tool to generate unit tests boilerplate.
|
||||||
Usage ~
|
Usage ~
|
||||||
|
|
||||||
- generate unit test for specific function/method:
|
- Generate unit test for specific function/method:
|
||||||
1. Place your cursor on the desired function/method.
|
1. Place your cursor on the desired function/method.
|
||||||
2. Run `:GoTestAdd`
|
2. Run `:GoTestAdd`
|
||||||
|
|
||||||
- generate unit tests for *all* functions/methods in current file:
|
- Generate unit tests for *all* functions/methods in current file:
|
||||||
- run `:GoTestsAll`
|
- run `:GoTestsAll`
|
||||||
|
|
||||||
- generate unit tests *only* for *exported(public)* functions/methods:
|
- Generate unit tests *only* for *exported(public)* functions/methods:
|
||||||
- run `:GoTestsExp`
|
- run `:GoTestsExp`
|
||||||
|
|
||||||
You can also specify the template to use for generating the tests. See |gopher.nvim-config|
|
You can also specify the template to use for generating the tests. See |gopher.nvim-config|
|
||||||
|
|
@ -196,15 +196,12 @@ But you must install `gotests@develop` because the stable version doesn't suppor
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
|
|
||||||
if you choose to install `gotests` within neovim, i recommend adding it to your `build` section in your |lazy.nvim|
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*gopher.nvim-iferr*
|
*gopher.nvim-iferr*
|
||||||
if you're using `iferr` tool, this module provides a way to automatically insert `if err != nil` check.
|
If you're using `iferr` tool, this module provides a way to automatically insert `if err != nil` check.
|
||||||
Usage ~
|
Usage ~
|
||||||
execute `:GoIfErr` near any err variable to insert the check
|
Execute `:GoIfErr` near any `err` variable to insert the check
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue