* feat(utils): first impl of own commands runner * refactor(gotests): uses own runner instead of vendored * refactor(utils): back to plenary.job * refactor(gotests): use new runner, clean code * fix(runner): now it returns output correctly * refactor(iferr): use vim.system i have tried to use _utils.runner, but i can't figure out how to make `< file.go` for the command * refactor(impl): use new runner * refactor(installer): use new runner * refactor(struct_tags): use new runner * refactor: commands such as :GoGet runs with new runner * refactor: throw errors in more lua way, i think * refactor(utils): notify now has title * refactor: use more correct way of notifying * refactor(runner): write error message on error
35 lines
820 B
Lua
35 lines
820 B
Lua
local tags = require "gopher.struct_tags"
|
|
local tests = require "gopher.gotests"
|
|
local gocmd = require("gopher._utils.runner.gocmd").run
|
|
local gopher = {}
|
|
|
|
gopher.setup = require("gopher.config").setup
|
|
gopher.install_deps = require("gopher.installer").install_deps
|
|
gopher.impl = require("gopher.impl").impl
|
|
gopher.iferr = require("gopher.iferr").iferr
|
|
gopher.comment = require "gopher.comment"
|
|
|
|
gopher.tags_add = tags.add
|
|
gopher.tags_rm = tags.remove
|
|
|
|
gopher.test_add = tests.func_test
|
|
gopher.test_exported = tests.all_exported_tests
|
|
gopher.tests_all = tests.all_tests
|
|
|
|
gopher.get = function(...)
|
|
gocmd("get", { ... })
|
|
end
|
|
|
|
gopher.mod = function(...)
|
|
gocmd("mod", { ... })
|
|
end
|
|
|
|
gopher.generate = function(...)
|
|
gocmd("generate", { ... })
|
|
end
|
|
|
|
gopher.work = function(...)
|
|
gocmd("work", { ... })
|
|
end
|
|
|
|
return gopher
|