good morning!!!!

Skip to content
Snippets Groups Projects
Commit f06f220c authored by Bas van Kervel's avatar Bas van Kervel
Browse files

added printing support for objects

parent 2a052830
Branches
Tags
No related merge requests found
......@@ -332,11 +332,13 @@ func (self *jsre) welcome(ipcpath string) {
func (self *jsre) batch(args cli.Args) {
statement := strings.Join(args, " ")
val, err := self.re.Run(statement)
if err != nil {
fmt.Printf("error: %v", err)
} else if val.IsDefined() && val.IsObject() {
obj, _ := self.re.Get("ret_result")
fmt.Printf("%v", obj)
} else if val.IsDefined() {
fmt.Printf("%v", val)
}
......@@ -346,7 +348,6 @@ func (self *jsre) batch(args cli.Args) {
}
self.re.Stop(false)
}
func (self *jsre) interactive(ipcpath string) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment