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

Isomorphic Templates

In the previous chapter, we provided an introduction to GopherJS, and we covered code examples to perform various front-end operations. One of the interesting tasks that we performed on the client side, was template rendering, using an inline Go template. However, rendering inline Go templates in the web browser is not a maintainable solution. For one thing, mixing HTML code from an inline Go template, along with Go source code, can become an unmaintainable arrangement as the project codebase grows. In addition to this, real-world web applications often require having multiple template files that are often nested together with a layout hierarchy in mind. In addition to that, the template package from Go's standard library ...

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