twitch-bot/cli_tplDocs.go
Knut Ahlers 673ed1e29a
Lint: Resolve linter issues
occurred with new Go / golangci-lint version

Signed-off-by: Knut Ahlers <knut@ahlers.me>
2024-02-18 13:42:00 +01:00

26 lines
533 B
Go

package main
import (
"bytes"
"os"
"github.com/pkg/errors"
)
func init() {
cli.Add(cliRegistryEntry{
Name: "tpl-docs",
Description: "Generate markdown documentation for available template functions",
Run: func([]string) error {
doc, err := generateTplDocs()
if err != nil {
return errors.Wrap(err, "generating template docs")
}
if _, err = os.Stdout.Write(append(bytes.TrimSpace(doc), '\n')); err != nil {
return errors.Wrap(err, "writing actor docs to stdout")
}
return nil
},
})
}