Documentation ¶
Overview ¶
Package template provides the functionality to render html pages based on the html/templates provided by go
Index ¶
Constants ¶
View Source
const ( // HTML enum denoting html file HTML fileType = iota // TEXT enum denoting text file TEXT // CSV enum denoting csv file CSV // FILE enum denoting other file types FILE )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { // Content holds the file data in slice of bytes Content []byte // ContentType holds the info about the file type ContentType string }
File contains the information about a File and provides functionality to render those files
type Template ¶
type Template struct { // Directory denotes the path to the file Directory string // File denotes the file name File string // Data has the information that template need to render the file Data interface{} // Type denotes the file type which is an integer Type fileType }
Template contains the info about the file and implements a renderer to render the file
func (*Template) ContentType ¶
ContentType returns the content type associated with the template's file type.
Click to show internal directories.
Click to hide internal directories.