2 files changed,
7 insertions(+),
11 deletions(-)
Author:
Smirnov Olexander
ss2316544@gmail.com
Committed at:
2022-06-17 22:32:41 +0300
Parent:
bc235b7
jump to
| M | lua/gopher/init.lua |
| M | lua/gopher/installer.lua |
M
lua/gopher/init.lua
@@ -1,7 +1,7 @@
local tags = require "gopher.struct_tags" local gopher = {} -gopher.install_deps = require("gopher.installer").install_all +gopher.install_deps = require "gopher.installer" gopher.tags_add = tags.add gopher.tags_rm = tags.remove gopher.mod = require "gopher.gomod"
M
lua/gopher/installer.lua
@@ -1,13 +1,11 @@
local Job = require "plenary.job" -local M = { - urls = { - gomodifytags = "github.com/fatih/gomodifytags", - impl = "github.com/josharian/impl", - }, +local urls = { + gomodifytags = "github.com/fatih/gomodifytags", + impl = "github.com/josharian/impl", } local function install(pkg) - local url = M.urls[pkg] .. "@latest" + local url = urls[pkg] .. "@latest" Job :new({@@ -26,10 +24,8 @@ :sync()
end ---Install required go deps -function M.install_all() - for pkg, _ in pairs(M.urls) do +return function() + for pkg, _ in pairs(urls) do install(pkg) end end - -return M