mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2025-03-15 03:07:43 +00:00
Fix: Do not copy reference but map content
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c18f96f889
commit
df9a23fec8
1 changed files with 4 additions and 1 deletions
|
@ -14,7 +14,10 @@ import (
|
|||
|
||||
func formatMessage(tplString string, m *irc.Message, r *rule, fields map[string]interface{}) (string, error) {
|
||||
// Create anonymous functions in current context in order to access function variables
|
||||
messageFunctions := korvike.GetFunctionMap()
|
||||
messageFunctions := make(template.FuncMap)
|
||||
for n, f := range korvike.GetFunctionMap() {
|
||||
messageFunctions[n] = f
|
||||
}
|
||||
|
||||
// Generic functions
|
||||
messageFunctions["toLower"] = strings.ToLower
|
||||
|
|
Loading…
Add table
Reference in a new issue