feat: call function with two argument

This commit is contained in:
debugtalk
2021-10-03 11:38:04 +08:00
parent b32a7a32b6
commit eca8af71f1
3 changed files with 45 additions and 12 deletions

View File

@@ -1,13 +1,15 @@
package builtin
import (
"math"
"math/rand"
"time"
)
var Functions = map[string]interface{}{
"sleep": sleep,
"gen_random_string": genRandomString,
"sleep": sleep, // call with one argument
"gen_random_string": genRandomString, // call with one argument
"max": math.Max, // call with two arguments
}
func sleep(nSecs int) {