twitch-bot/internal/template/slice/slice.go
Knut Ahlers b0d9b5782f
[template] Add inList function
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2022-06-20 21:55:24 +02:00

11 lines
279 B
Go

package slice
import (
"github.com/Luzifer/go_helpers/v2/str"
"github.com/Luzifer/twitch-bot/plugins"
)
func Register(args plugins.RegistrationArguments) error {
args.RegisterTemplateFunction("inList", plugins.GenericTemplateFunctionGetter(str.StringInSlice))
return nil
}