Documentation ¶
Index ¶
- Constants
- Variables
- func Bold(s string) string
- func Escape(s string) string
- func Escapef(format string, a ...any) string
- func FormatCommandHelp(cmd commands.Desc) string
- func FormatCommandShortHelp(cmd commands.Desc) string
- func FormatHelp(cmds []commands.Desc) string
- func FormatMessageCreated(id string) string
- func FormatMessages(header string, msgs []*standup.Message) string
- func Mono(s string) string
- func MustRenderTemplate(tmpl string, data any) string
- func ParseTime(s string, now time.Time) (time.Time, error)
- func RenderTemplate(tmpl string, data any) (string, error)
Constants ¶
View Source
const ParseMode = tgbotapi.ModeMarkdownV2
Variables ¶
View Source
var ErrInvalidTimeFormat = errors.New("invalid time format")
Functions ¶
func Escapef ¶ added in v0.0.2
Escapef is a formatted version of Escape, but it does not escape a. This means that these values must be valid when parsed via ParseMode.
func FormatCommandHelp ¶ added in v0.0.2
func FormatCommandShortHelp ¶ added in v0.0.2
func FormatHelp ¶ added in v0.0.2
func FormatMessageCreated ¶ added in v0.0.2
func FormatMessages ¶
FormatMessages formats a list of messages for the report. If present, header must be valid when parsed with ParseMode (see Escape).
func MustRenderTemplate ¶ added in v0.0.2
MustRenderTemplate acts like RenderTemplate, but panics on errors.
func RenderTemplate ¶ added in v0.0.2
RenderTemplate renders text/template.Template tmpl. All plaint text nodes of the template are escaped via Escape. The following functions are also availible in template context:
- "bold" -> Bold
- "mono" -> Mono
- "esc" -> Escape
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.