Documentation ¶
Overview ¶
Package htmlrenderer provides an interface and its implementations for rendering HTML pages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultRootDir is the default root directory. DefaultRootDir = filepath.FromSlash("templates/") // DefaultLayoutsDir is the default layout directory. Relative to root directory. DefaultLayoutsDir = filepath.FromSlash("layouts/") // DefaultExtension is the default template file extension. DefaultExtension = ".html" // ErrTemplateNotFound is the internal error when template is not found. ErrTemplateNotFound = errors.New("template not found") )
Functions ¶
Types ¶
type HTMLRenderer ¶
type HTMLRenderer interface { // RenderHTML renders html template RenderHTML(res http.ResponseWriter, path string, data any) }
HTMLRenderer is the interface for rendering
Click to show internal directories.
Click to hide internal directories.