Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. package main
  2.  
  3. import "github.com/obscuren/otto"
  4.  
  5. func main() {
  6. ot := otto.New()
  7.  
  8. var obj struct {
  9. Addr string
  10. Number int
  11. }
  12. obj.Addr = "hello"
  13. obj.Number = 10
  14.  
  15. ot.Set("def", obj)
  16. ot.Run(`console.log(JSON.stringify(def))`)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement