Run the golang tests using vim-go commands
Install the plugin with your preferred package manager:
-- Lua
{
"pablotrianda/test-golang",
dependencies = {
"anuvyklack/hydra.nvim",
"fatih/vim-go"
},
config = true,
keys = { { "<leader>t", desc = "Open Test menu" } },
}
๐ฎ <leader>t
Show the following options:
GoTestFunc
GoFuncFile
GoTestCompile
GoCoverage (Diff)
go test ./... -coverprofile=cover.out && go tool cover -html=cover.out
(Open in browser)