docs: Regenerate docs helper

This commit is contained in:
Bjørn Erik Pedersen
2022-02-28 08:52:15 +01:00
parent 260ff1374d
commit 12d00d288c
3 changed files with 59 additions and 8 deletions

View File

@@ -163,6 +163,10 @@ func (namespaces TemplateFuncsNamespaces) MarshalJSON() ([]byte, error) {
return buf.Bytes(), nil
}
var ignoreFuncs = map[string]bool{
"Reset": true,
}
func (t *TemplateFuncsNamespace) toJSON() ([]byte, error) {
var buf bytes.Buffer
@@ -179,6 +183,9 @@ func (t *TemplateFuncsNamespace) toJSON() ([]byte, error) {
ctxType := reflect.TypeOf(ctx)
for i := 0; i < ctxType.NumMethod(); i++ {
method := ctxType.Method(i)
if ignoreFuncs[method.Name] {
continue
}
f := goDocFunc{
Name: method.Name,
}