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/goget.lua

16 lines
313 B
Lua

2 years ago
local runner = require("go.runner")
local M = {}
function M.run(args)
for i, arg in ipairs(args) do
local m = string.match(arg, "^https?://(.*)$") or arg
table.remove(args, i)
table.insert(args, i, m)
end
local cmd = { "go", "get" }
vim.list_extend(cmd, args)
runner.run(cmd)
end
return M