lang: funcs: core: Make module names public
This is needed for when we have nested modules.
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
simple.ModuleRegister(moduleName, "split", &types.FuncValue{
|
||||
simple.ModuleRegister(ModuleName, "split", &types.FuncValue{
|
||||
T: types.NewType("func(a str, b str) []str"),
|
||||
V: Split,
|
||||
})
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
package corestrings
|
||||
|
||||
const (
|
||||
// moduleName is the prefix given to all the functions in this module.
|
||||
moduleName = "strings"
|
||||
// ModuleName is the prefix given to all the functions in this module.
|
||||
ModuleName = "strings"
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
simple.ModuleRegister(moduleName, "to_lower", &types.FuncValue{
|
||||
simple.ModuleRegister(ModuleName, "to_lower", &types.FuncValue{
|
||||
T: types.NewType("func(a str) str"),
|
||||
V: ToLower,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user