O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The GopherJS transpiler

We use the GopherJS transpiler to convert a Go program into a JavaScript program. Figure 3.5 depicts a Go program that not only makes use of the functionality from the Go standard library but also uses the functionality from various JavaScript APIs using the equivalent GopherJS bindings package:

Figure 3.5: A Go program that makes use of the standard library and GopherJS bindings transpiled to an equivalent JavaScript program

We use the gopherjs build command to transpile the Go program into its equivalent JavaScript representation. The produced JavaSript source code is not meant to be modified by humans. The JavaScript ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required