3 ms·
Im always curious to see usages of GopherJS in the wild. However the Go code used to generate the demo is a bit ugly (sorry, don't mean as a judgement on the au
by AYBABTME 12y ago
Im always curious to see usages of GopherJS in the wild. However the Go code used to generate the demo is a bit ugly (sorry, don't mean as a judgement on the author). Is it something that follows from the idioms required of interfacing with JS-land, or is it unrelated?
I haven't seen clean code using GopherJS so far, if anyone has examples, please let me know.
- tidwall 12y agoI'm sure that there are developers making much prettier Go code with GopherJS. There's a default package that comes with GopherJS which is allows for interacting with the JS world and the DOM. It's pretty raw and can result in what you are seeing as ugly. There are some great new packages being developed which give a more Go style. One is: http://godoc.org/honnef.co/go/js/dom http://godoc.org/honnef.co/go/js/dom This demo uses only the default packages, which is one of the goals of the project.