1. remove some stdmod functions for the latest Go version 2. add .travis.yml
This commit is contained in:
parent
d55b667616
commit
029a3c11b4
3 changed files with 74 additions and 87 deletions
10
.travis.yml
Normal file
10
.travis.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- 1.9
|
||||||
|
|
||||||
|
install:
|
||||||
|
- make dep
|
||||||
|
|
||||||
|
script:
|
||||||
|
- make test
|
|
@ -34,8 +34,6 @@ var mathModule = map[string]objects.Object{
|
||||||
"dim": FuncAFFRF(math.Dim),
|
"dim": FuncAFFRF(math.Dim),
|
||||||
"erf": FuncAFRF(math.Erf),
|
"erf": FuncAFRF(math.Erf),
|
||||||
"erfc": FuncAFRF(math.Erfc),
|
"erfc": FuncAFRF(math.Erfc),
|
||||||
"erfcinv": FuncAFRF(math.Erfcinv),
|
|
||||||
"erfinv": FuncAFRF(math.Erfinv),
|
|
||||||
"exp": FuncAFRF(math.Exp),
|
"exp": FuncAFRF(math.Exp),
|
||||||
"exp2": FuncAFRF(math.Exp2),
|
"exp2": FuncAFRF(math.Exp2),
|
||||||
"expm1": FuncAFRF(math.Expm1),
|
"expm1": FuncAFRF(math.Expm1),
|
||||||
|
@ -63,8 +61,6 @@ var mathModule = map[string]objects.Object{
|
||||||
"pow": FuncAFFRF(math.Pow),
|
"pow": FuncAFFRF(math.Pow),
|
||||||
"pow10": FuncAIRF(math.Pow10),
|
"pow10": FuncAIRF(math.Pow10),
|
||||||
"remainder": FuncAFFRF(math.Remainder),
|
"remainder": FuncAFFRF(math.Remainder),
|
||||||
"round": FuncAFRF(math.Round),
|
|
||||||
"round_to_even": FuncAFRF(math.RoundToEven),
|
|
||||||
"signbit": FuncAFRB(math.Signbit),
|
"signbit": FuncAFRB(math.Signbit),
|
||||||
"sin": FuncAFRF(math.Sin),
|
"sin": FuncAFRF(math.Sin),
|
||||||
"sinh": FuncAFRF(math.Sinh),
|
"sinh": FuncAFRF(math.Sinh),
|
||||||
|
|
|
@ -48,8 +48,6 @@ var osModule = map[string]objects.Object{
|
||||||
"clearenv": FuncAR(os.Clearenv),
|
"clearenv": FuncAR(os.Clearenv),
|
||||||
// environ() => array(string)
|
// environ() => array(string)
|
||||||
"environ": FuncARSs(os.Environ),
|
"environ": FuncARSs(os.Environ),
|
||||||
// executable() => string/error
|
|
||||||
"executable": &objects.UserFunction{Value: osExecutable},
|
|
||||||
// exit(code int)
|
// exit(code int)
|
||||||
"exit": FuncAIR(os.Exit),
|
"exit": FuncAIR(os.Exit),
|
||||||
// expand_env(s string) => string
|
// expand_env(s string) => string
|
||||||
|
@ -104,8 +102,6 @@ var osModule = map[string]objects.Object{
|
||||||
"truncate": FuncASI64RE(os.Truncate),
|
"truncate": FuncASI64RE(os.Truncate),
|
||||||
// unsetenv(key string) => error
|
// unsetenv(key string) => error
|
||||||
"unsetenv": FuncASRE(os.Unsetenv),
|
"unsetenv": FuncASRE(os.Unsetenv),
|
||||||
// user_cache_dir() => string/error
|
|
||||||
"user_cache_dir": FuncARSE(os.UserCacheDir),
|
|
||||||
// create(name string) => imap(file)/error
|
// create(name string) => imap(file)/error
|
||||||
"create": &objects.UserFunction{Value: osCreate},
|
"create": &objects.UserFunction{Value: osCreate},
|
||||||
// open(name string) => imap(file)/error
|
// open(name string) => imap(file)/error
|
||||||
|
@ -116,21 +112,6 @@ var osModule = map[string]objects.Object{
|
||||||
"find_process": &objects.UserFunction{Value: osFindProcess},
|
"find_process": &objects.UserFunction{Value: osFindProcess},
|
||||||
// start_process(name string, argv array(string), dir string, env array(string)) => imap(process)/error
|
// start_process(name string, argv array(string), dir string, env array(string)) => imap(process)/error
|
||||||
"start_process": &objects.UserFunction{Value: osStartProcess},
|
"start_process": &objects.UserFunction{Value: osStartProcess},
|
||||||
|
|
||||||
// TODO: implemented more functions
|
|
||||||
//"stdin": nil,
|
|
||||||
//"stdout": nil,
|
|
||||||
//"stderr": nil,
|
|
||||||
//"chtimes": nil,
|
|
||||||
//"expand": nil,
|
|
||||||
//"is_exists": nil,
|
|
||||||
//"is_not_exist": nil,
|
|
||||||
//"is_path_separator": nil,
|
|
||||||
//"is_permission": nil,
|
|
||||||
//"is_timeout": nil,
|
|
||||||
//"new_syscall_error": nil,
|
|
||||||
//"pipe": nil,
|
|
||||||
//"same_file": nil,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func osArgs(args ...objects.Object) (objects.Object, error) {
|
func osArgs(args ...objects.Object) (objects.Object, error) {
|
||||||
|
|
Loading…
Reference in a new issue