remove api module
This commit is contained in:
parent
ab874c6c4f
commit
59de7dc72d
3 changed files with 40 additions and 45 deletions
|
|
@ -1,29 +0,0 @@
|
||||||
local API = {}
|
|
||||||
local tags = require "gopher.struct_tags"
|
|
||||||
local tests = require "gopher.gotests"
|
|
||||||
local cmd = require "gopher._utils.commands"
|
|
||||||
|
|
||||||
API.install_deps = require "gopher.installer"
|
|
||||||
API.tags_add = tags.add
|
|
||||||
API.tags_rm = tags.remove
|
|
||||||
API.impl = require "gopher.impl"
|
|
||||||
API.iferr = require "gopher.iferr"
|
|
||||||
API.comment = require "gopher.comment"
|
|
||||||
API.test_add = tests.func_test
|
|
||||||
API.test_exported = tests.all_exported_tests
|
|
||||||
API.tests_all = tests.all_tests
|
|
||||||
|
|
||||||
API.get = function(...)
|
|
||||||
cmd("get", ...)
|
|
||||||
end
|
|
||||||
API.mod = function(...)
|
|
||||||
cmd("mod", ...)
|
|
||||||
end
|
|
||||||
API.generate = function(...)
|
|
||||||
cmd("generate", ...)
|
|
||||||
end
|
|
||||||
API.work = function(...)
|
|
||||||
cmd("work", ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
return API
|
|
||||||
|
|
@ -1,5 +1,29 @@
|
||||||
local GOPHER = {}
|
local stags = require "gopher.struct_tags"
|
||||||
|
local tests = require "gopher.gotests"
|
||||||
|
local cmd = require "gopher._utils.commands"
|
||||||
|
local gopher = {}
|
||||||
|
|
||||||
GOPHER.setup = require("gopher.config").setup
|
gopher.setup = require("gopher.config").setup
|
||||||
|
gopher.install_deps = require "gopher.installer"
|
||||||
|
gopher.tags_add = stags.add
|
||||||
|
gopher.tags_rm = stags.remove
|
||||||
|
gopher.impl = require "gopher.impl"
|
||||||
|
gopher.iferr = require "gopher.iferr"
|
||||||
|
gopher.comment = require "gopher.comment"
|
||||||
|
gopher.test_add = tests.func_test
|
||||||
|
gopher.test_exported = tests.all_exported_tests
|
||||||
|
gopher.tests_all = tests.all_tests
|
||||||
|
gopher.get = function(...)
|
||||||
|
cmd("get", ...)
|
||||||
|
end
|
||||||
|
gopher.mod = function(...)
|
||||||
|
cmd("mod", ...)
|
||||||
|
end
|
||||||
|
gopher.generate = function(...)
|
||||||
|
cmd("generate", ...)
|
||||||
|
end
|
||||||
|
gopher.work = function(...)
|
||||||
|
cmd("work", ...)
|
||||||
|
end
|
||||||
|
|
||||||
return GOPHER
|
return gopher
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
command! -nargs=* GoTagAdd :lua require"gopher.api".tags_add(<f-args>)
|
command! -nargs=* GoTagAdd :lua require"gopher".tags_add(<f-args>)
|
||||||
command! -nargs=* GoTagRm :lua require"gopher.api".tags_rm(<f-args>)
|
command! -nargs=* GoTagRm :lua require"gopher".tags_rm(<f-args>)
|
||||||
command! -nargs=* GoTestAdd :lua require"gopher.api".test_add(<f-args>)
|
command! -nargs=* GoTestAdd :lua require"gopher".test_add(<f-args>)
|
||||||
command! -nargs=* GoTestsAll :lua require"gopher.api".tests_all(<f-args>)
|
command! -nargs=* GoTestsAll :lua require"gopher".tests_all(<f-args>)
|
||||||
command! -nargs=* GoTestsExp :lua require"gopher.api".test_exported(<f-args>)
|
command! -nargs=* GoTestsExp :lua require"gopher".test_exported(<f-args>)
|
||||||
command! -nargs=* GoMod :lua require"gopher.api".mod(<f-args>)
|
command! -nargs=* GoMod :lua require"gopher".mod(<f-args>)
|
||||||
command! -nargs=* GoGet :lua require"gopher.api".get(<f-args>)
|
command! -nargs=* GoGet :lua require"gopher".get(<f-args>)
|
||||||
command! -nargs=* GoWork :lua require"gopher.api".work(<f-args>)
|
command! -nargs=* GoWork :lua require"gopher".work(<f-args>)
|
||||||
command! -nargs=* GoImpl :lua require"gopher.api".impl(<f-args>)
|
command! -nargs=* GoImpl :lua require"gopher".impl(<f-args>)
|
||||||
command! -nargs=* GoGenerate :lua require"gopher.api".generate(<f-args>)
|
command! -nargs=* GoGenerate :lua require"gopher".generate(<f-args>)
|
||||||
command! GoCmt :lua require"gopher.api".comment()
|
command! GoCmt :lua require"gopher".comment()
|
||||||
command! GoIfErr :lua require"gopher.api".iferr()
|
command! GoIfErr :lua require"gopher".iferr()
|
||||||
command! GoInstallDeps :lua require"gopher.api".install_deps()
|
command! GoInstallDeps :lua require"gopher".install_deps()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue