Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "github.com/obscuren/otto"
- func main() {
- ot := otto.New()
- var obj struct {
- Addr string
- Number int
- }
- obj.Addr = "hello"
- obj.Number = 10
- ot.Set("def", obj)
- ot.Run(`console.log(JSON.stringify(def))`)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement