You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go.nvim/lua/go/govulncheck.lua

33 lines
576 B
Lua

local runner = require('go.runner')
local utils = require('go.utils')
local log = utils.log
local M = {}
function M.run(args)
require('go.install').install('govulncheck')
args = args or {}
local cmd = { 'govulncheck' }
local pkg
if #args > 1 then
pkg = args[2]
else
pkg = './...'
end
vim.list_extend(cmd, { pkg })
log(cmd)
local opts = {
update_buffer = true,
on_exit = function()
vim.schedule(function()
utils.restart()
end)
end,
}
log('running', cmd)
runner.run(cmd, opts)
return cmd, opts
end
return M