html

package
v0.0.0-...-c14a31e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BaseTemplate = `` /* 1284-byte string literal not displayed */
View Source
const ErrorTemplate = `` /* 724-byte string literal not displayed */

Variables

This section is empty.

Functions

func RenderError

func RenderError(e error, routeID string) []byte

RenderError Renders the error template with the given error

func RenderHTMLString

func RenderHTMLString(params Params) []byte

RenderHTMLString Renders the HTML template in internal/html with the given parameters

Types

type ErrorParams

type ErrorParams struct {
	Error   string
	RouteID string
	IsDev   bool
}

type Params

type Params struct {
	Title      string
	MetaTags   map[string]string
	OGMetaTags map[string]string
	Links      []struct {
		Href     string
		Rel      string
		Media    string
		Hreflang string
		Type     string
		Title    string
	}
	JS         template.JS
	CSS        template.CSS
	RouteID    string
	IsDev      bool
	ServerHTML template.HTML
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL