Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteString ¶ added in v0.9.2
func WriteString(w http.ResponseWriter, format string, data []any) (err error)
Types ¶
type HTML ¶
HTML contains template reference and its name with given interface object.
func (HTML) Render ¶
func (r HTML) Render(w http.ResponseWriter) error
Render (HTML) executes template and writes its result with custom ContentType for response.
func (HTML) WriteContentType ¶
func (r HTML) WriteContentType(w http.ResponseWriter)
WriteContentType (HTML) writes HTML ContentType.
type HTMLRender ¶
type Redirect ¶
Redirect contains the http request reference and redirects status code and location.
func (Redirect) Render ¶
func (r Redirect) Render(w http.ResponseWriter) error
Render (Redirect) redirects the http request to new location and writes redirect response.
func (Redirect) WriteContentType ¶
func (r Redirect) WriteContentType(http.ResponseWriter)
WriteContentType (Redirect) don't write any ContentType.
type Render ¶
type Render interface { // Render writes data with custom ContentType. Render(http.ResponseWriter) error // WriteContentType writes custom ContentType. WriteContentType(w http.ResponseWriter) }
type Text ¶ added in v0.9.2
func (Text) WriteContentType ¶ added in v0.9.2
func (r Text) WriteContentType(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.