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 template data object

The major responsibility of the template data object (or simply the data object) is to supply a given template with data that is to be presented to the user. In the About page that we will be constructing, there are two pieces of data that need to be presented. The first need is subtle, it's the title of the web page that will be displayed in the web browser's title bar window, or as the title of the web browser tab containing the web page. The second data need is more profound, it is the data object, the list of gophers that should be displayed on the About page.

We will use the following About struct from the templatedata package, defined in the shared/templatedata/about.go source file, to fulfill the data needs ...

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