Fix skilldesc IDs
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
"text/template"
|
||||
)
|
||||
@@ -108,6 +109,10 @@ func generateFile(sourcePath, destinationPath, tpl string) error {
|
||||
"list": func() []string {
|
||||
return make([]string, 0)
|
||||
},
|
||||
"extractInt": func(s string) string {
|
||||
reg := regexp.MustCompile("[^0-9]")
|
||||
return reg.ReplaceAllString(s, "")
|
||||
},
|
||||
}
|
||||
|
||||
t := template.Must(template.New("tpl").Funcs(funcMap).Parse(tpl))
|
||||
|
||||
Reference in New Issue
Block a user