feat: call function with two argument

This commit is contained in:
debugtalk
2021-10-03 11:38:04 +08:00
parent f3742d3f6c
commit 2780ad9f67
3 changed files with 45 additions and 12 deletions
+4 -2
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) {