all repos

gopher.nvim @ e8fe6c5b153646c28d0e63026083374bbdecb9e2

Minimalistic plugin for Go development

gopher.nvim/lua/gopher/api.lua(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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