render

package
v0.0.0-...-7396d26 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalization

func GetLocalization(lang string, a *server.App) (map[string]interface{}, error)

GetLocalization function returns the localization for the given language

Types

type Localizations

type Localizations map[string]map[string]map[string]interface{}

type Renderer

type Renderer struct {
	Template      *template.Template
	ParseError    error
	BuildVersion  string
	LatestVersion string
}

func GetHTMLRenderer

func GetHTMLRenderer(mainPath string, filename string, fs fs.FS, a *server.App, fragmentsPath ...string) (*Renderer, error)

GetHTMLRenderer function returns a new Renderer instance

func (*Renderer) Render

func (r *Renderer) Render(data interface{}, a *server.App) (string, error)

Render function renders the template with the given data

Jump to

Keyboard shortcuts

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