Documentation
¶
Index ¶
Constants ¶
const ( Ext = ".html" ContentType = "text/html; charset=utf-8" )
const DefaultHTML = `` /* 545-byte string literal not displayed */
The default html template. It is exported for documentation purposes (can be used as a basis for your more elaborate templates).
Variables ¶
var DefaultTemplate = must(New("_default.html").Parse(DefaultHTML))
Functions ¶
This section is empty.
Types ¶
type Template ¶
Template extends the standard html/template.Template to implement interface sql2http.Template (with ContentType method).
func New ¶
New wraps the standard library html/template.New. It is a simple helper function to avoid importing the standard library.
func ParseTree ¶
ParseTree creates a new Template, walks recursively the files starting at the given directory, and for each file ending with ".html" parses the template definition under the relative file name. The returned template is the first matching file.
func (*Template) ContentType ¶
ContentType implements interface sql2http.Template. It returns the constant string ContentType.