Fix up template
This commit is contained in:
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"text/template"
|
||||
)
|
||||
@@ -26,7 +25,6 @@ func init() {
|
||||
Error.Printf("Error parsing template: %v", err)
|
||||
return
|
||||
}
|
||||
log.Printf("%#v", functionTemplate)
|
||||
}
|
||||
|
||||
type (
|
||||
|
@@ -1,2 +1,8 @@
|
||||
---@diagnostic disable: missing-return, lowercase-global
|
||||
function {{.Name}}({{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param.Name}}: {{$param.Type}}{{end}}) end
|
||||
{{range .Arguments -}}
|
||||
---@param {{.Name}} {{.Type}} {{.Description}}
|
||||
{{end -}}
|
||||
{{range .Returns -}}
|
||||
---@return {{.Type}} {{.Name}} {{if .Description}}#{{.Description}}{{end}}
|
||||
{{end -}}
|
||||
function {{.Name}}({{range $index, $param := .Arguments}}{{if $index}}, {{end}}{{$param.Name}}{{end}}) end
|
Reference in New Issue
Block a user