feat: add help messages
feat(goget): add help message feat(gomod): add help message
This commit is contained in:
parent
0b415c32e8
commit
096bc8e7ee
2 changed files with 10 additions and 0 deletions
|
|
@ -4,6 +4,11 @@ local u = require "gopher._utils"
|
||||||
---run "go get"
|
---run "go get"
|
||||||
return function(...)
|
return function(...)
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
|
if #args == 0 then
|
||||||
|
u.notify("please provide a package url to get", "error")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
for i, arg in ipairs(args) do
|
for i, arg in ipairs(args) do
|
||||||
local m = string.match(arg, "^https://(.*)$") or string.match(arg, "^http://(.*)$") or arg
|
local m = string.match(arg, "^https://(.*)$") or string.match(arg, "^http://(.*)$") or arg
|
||||||
table.remove(args, i)
|
table.remove(args, i)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@ local u = require "gopher._utils"
|
||||||
---run "go mod"
|
---run "go mod"
|
||||||
return function(...)
|
return function(...)
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
|
if #args == 0 then
|
||||||
|
u.notify("please provide any mod command", "error")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local cmd_args = vim.list_extend({ "mod" }, args)
|
local cmd_args = vim.list_extend({ "mod" }, args)
|
||||||
|
|
||||||
Job
|
Job
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue