refactor(api)!: mave tags and gotests api into their sub tables

This commit is contained in:
Smirnov Oleksandr 2024-02-25 01:18:09 +02:00
parent ebb10e9b90
commit 28e1f5689f
2 changed files with 14 additions and 10 deletions

View file

@ -9,12 +9,16 @@ gopher.impl = require("gopher.impl").impl
gopher.iferr = require("gopher.iferr").iferr gopher.iferr = require("gopher.iferr").iferr
gopher.comment = require "gopher.comment" gopher.comment = require "gopher.comment"
gopher.tags_add = tags.add gopher.tags = {
gopher.tags_rm = tags.remove add = tags.add,
rm = tags.remove,
}
gopher.test_add = tests.func_test gopher.test = {
gopher.test_exported = tests.all_exported_tests add = tests.func_test,
gopher.tests_all = tests.all_tests exported = tests.all_exported_tests,
all = tests.all_tests,
}
gopher.get = function(...) gopher.get = function(...)
gocmd("get", { ... }) gocmd("get", { ... })

View file

@ -1,8 +1,8 @@
command! -nargs=* GoTagAdd :lua require"gopher".tags_add(<f-args>) command! -nargs=* GoTagAdd :lua require"gopher".tags.add(<f-args>)
command! -nargs=* GoTagRm :lua require"gopher".tags_rm(<f-args>) command! -nargs=* GoTagRm :lua require"gopher".tags.rm(<f-args>)
command! GoTestAdd :lua require"gopher".test_add() command! GoTestAdd :lua require"gopher".test.add()
command! GoTestsAll :lua require"gopher".tests_all() command! GoTestsAll :lua require"gopher".test.all()
command! GoTestsExp :lua require"gopher".test_exported() command! GoTestsExp :lua require"gopher".test.exported()
command! -nargs=* GoMod :lua require"gopher".mod(<f-args>) command! -nargs=* GoMod :lua require"gopher".mod(<f-args>)
command! -nargs=* GoGet :lua require"gopher".get(<f-args>) command! -nargs=* GoGet :lua require"gopher".get(<f-args>)
command! -nargs=* GoWork :lua require"gopher".work(<f-args>) command! -nargs=* GoWork :lua require"gopher".work(<f-args>)