mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-09-07 20:39:07 +00:00
and fix some newly appearing linter errors Signed-off-by: Knut Ahlers <knut@ahlers.me>
28 lines
578 B
Go
28 lines
578 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"os"
|
|
|
|
"github.com/Luzifer/go_helpers/v2/cli"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func init() {
|
|
cliTool.Add(cli.RegistryEntry{
|
|
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
|
|
},
|
|
})
|
|
}
|