booklit
booklit copied to clipboard
support int argument types
quality-of-life improvement for plugin functions which take numeric args like \foos{5}:
func (plug MyPlugin) Foos(count int) booklit.Content {
// ...
}
instead of
func (plug MyPlugin) Foos(countStr string) (booklit.Content, error) {
count, err := strconv.Atoi(countStr)
if err != nil {
return nil, err
}
}
use case: being able to configure the number of dynamically fetched entries to show without having to recompile the plugin with a magic const value.