templates/

directory
Version: v0.0.0-...-86d22a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2017 License: Apache-2.0

README

Web - Templates

Learn the basics of using templates to parse and generate markup.

Notes

  • The standard library has much of what you need to build services and apps.
  • The http package provides the building blocks.
  • There are other great packages in the Go ecosystem to help.

https://golang.org/pkg/net/http/
https://golang.org/doc/articles/wiki/
https://github.com/GeertJohan/go.rice

Code Review

Basic Template: Code | Test
Data Parsing: Code | Test
Struct Parsing: Code | Test
Escaping: Code | Test
Escaping 2: Code | Test
Complex Markup: Code | Test
Serving Assets: Code | Test
Bundling Assets: Code | Test | Assets

Exercises

Exercise 1

Take the code from example 6 (Complex Markup) and add a map of key/value pairs that represents the user's roles. Then add a section to the template to render the set of roles a user has.


All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
Sample program to show how to use create, parse and execute a simple template.
Sample program to show how to use create, parse and execute a simple template.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to use create, parse and execute a template with simple data processing.
Sample program to show how to serve up static files from a web application and deliver a home page.
Sample program to show how to serve up static files from a web application and deliver a home page.
Sample program to show how to bundle assets, static files, etc into web application and access these bundled resources.
Sample program to show how to bundle assets, static files, etc into web application and access these bundled resources.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL