summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2024-10-15 16:32:33 +0600
committerunwox <me@unwox.com>2024-10-15 16:32:33 +0600
commit41ba7127063d65638ae2ec1941f737e9d3426ef3 (patch)
treed5b12d714f12d5df683799e1cdc23b9811671d74 /main.go
parentccce95dcd0cb3336182dd38faa0d56acd1b728e4 (diff)
rename utf module to utf8
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index 7ee2c9d..93e7dad 100644
--- a/main.go
+++ b/main.go
@@ -342,8 +342,8 @@ func main() {
}
// define luna.utf module
- utfModule := make(map[string]any)
- utfModule["len"] = func (l *Lua) int {
+ utf8Module := make(map[string]any)
+ utf8Module["len"] = func (l *Lua) int {
var str string
err := l.Scan(&str)
if err != nil {
@@ -351,7 +351,7 @@ func main() {
}
return luaOk(l, utf8.RuneCountInString(str))
}
- utfModule["lower"] = func (l *Lua) int {
+ utf8Module["lower"] = func (l *Lua) int {
var str string
err := l.Scan(&str)
if err != nil {
@@ -359,7 +359,7 @@ func main() {
}
return luaOk(l, strings.ToLower(str))
}
- utfModule["sub"] = func (l *Lua) int {
+ utf8Module["sub"] = func (l *Lua) int {
var str string
var start, length int
err := l.Scan(&str, &start, &length)
@@ -375,7 +375,7 @@ func main() {
module["router"] = routeModule
module["http"] = httpModule
module["db"] = dbModule
- module["utf"] = utfModule
+ module["utf8"] = utf8Module
wg := sync.WaitGroup{}
wg.Add(*wrksNum)