feat: move all lua api into api module

This commit is contained in:
Smirnov Oleksandr 2022-10-07 16:41:40 +03:00
parent d65884b182
commit 294902970d
3 changed files with 41 additions and 29 deletions

26
lua/gopher/api.lua Normal file
View file

@ -0,0 +1,26 @@
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
return API