mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-30 00:21:16 +00:00
Knut Ahlers
c63793be2d
and fix some newly appearing linter errors Signed-off-by: Knut Ahlers <knut@ahlers.me>
27 lines
567 B
Go
27 lines
567 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: "actor-docs",
|
|
Description: "Generate markdown documentation for available actors",
|
|
Run: func([]string) error {
|
|
doc, err := generateActorDocs()
|
|
if err != nil {
|
|
return errors.Wrap(err, "generating actor docs")
|
|
}
|
|
if _, err = os.Stdout.Write(append(bytes.TrimSpace(doc), '\n')); err != nil {
|
|
return errors.Wrap(err, "writing actor docs to stdout")
|
|
}
|
|
|
|
return nil
|
|
},
|
|
})
|
|
}
|