(go) Add support for godoc

This commit is contained in:
Daniel Mathiot
2021-09-12 19:42:29 +02:00
parent 7b8631697d
commit ba98b965e6
3 changed files with 27 additions and 0 deletions

View File

@@ -169,6 +169,8 @@ There is a list of supported languages and fields, with their annotation style
| | [JSDoc](https://jsdoc.app) (`"jsdoc"`) | `@param`, `@returns`, `@class`, `@classdesc` |
| c | | |
| | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `@param`, `@returns` |
| go | | |
| | [Godoc](https://go.dev/blog/godoc) (`"godoc"`) | |
## Adding Languages

View File

@@ -128,6 +128,7 @@ neogen.setup = function(opts)
python = require("neogen.configurations.python"),
javascript = require("neogen.configurations.javascript"),
c = require("neogen.configurations.c"),
go = require("neogen.configurations.go"),
},
})

View File

@@ -0,0 +1,24 @@
return {
parent = {
func = { "function_declaration" },
},
data = {
func = {
["function_declaration"] = {
["0"] = {
extract = function()
return {}
end,
},
},
},
},
template = {
annotation_convention = "godoc",
godoc = {
{ nil, " $1", { no_results = true } },
},
},
}