1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-05 19:19:10 +08:00

Fix example

This commit is contained in:
kazhuravlev 2016-01-29 14:15:00 +03:00
parent 089191042f
commit 2bebd7b731

View File

@ -20,8 +20,10 @@ Run something in the VM
Get a value out of the VM
value, err := vm.Get("abc")
value, _ := value.ToInteger()
if value, err := vm.Get("abc"); err == nil {
if value_int, err := value.ToInteger(); err == nil {
fmt.Printf("", value_int, err)
}
}
Set a number