© Jan Newmarch and Ronald Petty 2022
J. Newmarch, R. PettyNetwork Programming with Go Languagehttps://doi.org/10.1007/978-1-4842-8095-9_9

9. Templates

Jan Newmarch1   and Ronald Petty2
(1)
Oakleigh, VIC, Australia
(2)
San Francisco, CA, USA
 

Most server-side languages have a mechanism for taking predominantly static pages and inserting a dynamically generated component, such as a list of items. Typical examples are scripts in Java Server Pages, PHP scripting, and many others. Go has adopted a relatively simple scripting language in the template package.

The package is designed to take text as input and output different text, based on transforming the original text using the values of an object. Unlike JSP or similar, it is not restricted to HTML files, ...

Get Network Programming with Go Language: Essential Skills for Programming, Using and Securing Networks with Open Source Google Golang now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.