lang: Add common type to global variables
We use the list of strings so often, we might as well give it a global variable.
This commit is contained in:
@@ -50,7 +50,7 @@ func Split(input []types.Value) (types.Value, error) {
|
||||
|
||||
segments := strings.Split(str, sep)
|
||||
|
||||
listVal := types.NewList(types.NewType("[]str"))
|
||||
listVal := types.NewList(types.TypeListStr)
|
||||
|
||||
for _, segment := range segments {
|
||||
listVal.Add(&types.StrValue{
|
||||
|
||||
Reference in New Issue
Block a user