MCPcopy
hub / github.com/writefreely/writefreely / NewWFHandler

Function NewWFHandler

handle.go:112–122  ·  view source on GitHub ↗

NewWFHandler returns a new Handler instance, using WriteFreely template files. You MUST call writefreely.InitTemplates() before this.

(apper Apper)

Source from the content-addressed store, hash-verified

110// NewWFHandler returns a new Handler instance, using WriteFreely template files.
111// You MUST call writefreely.InitTemplates() before this.
112func NewWFHandler(apper Apper) *Handler {
113 h := NewHandler(apper)
114 h.SetErrorPages(&ErrorPages{
115 NotFound: pages["404-general.tmpl"],
116 Gone: pages["410.tmpl"],
117 InternalServerError: pages["500.tmpl"],
118 UnavailableError: pages["503.tmpl"],
119 Blank: pages["blank.tmpl"],
120 })
121 return h
122}
123
124// SetErrorPages sets the given set of ErrorPages as templates for any errors
125// that come up.

Callers 2

initGopherFunction · 0.85
InitRoutesFunction · 0.85

Calls 2

SetErrorPagesMethod · 0.95
NewHandlerFunction · 0.85

Tested by

no test coverage detected