gopherjs / gopherjs.github.io

GopherJS Playground
https://gopherjs.github.io/playground/
23 stars 12 forks source link

Simplify code #28

Closed gbbr closed 9 years ago

gbbr commented 9 years ago

Not sure if there was any purpose in having your version as it was, but this should simplify it.

neelance commented 9 years ago

Your change is valid, it's just that the purpose is to show that one should wrap the blocking code into a go statement. Maybe this would be better:

  go func() {
    [...]
    someBlockingFunction()
    [...]
  }()

What do you think?