routes

package
v0.0.0-...-dec46cf Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Templates *template.Template

Templates - Global Variable of templates

Functions

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler - Main Page handler

func InitTemplates

func InitTemplates() error

InitTemplates - init Templates

func RenderErrorPage

func RenderErrorPage(w http.ResponseWriter, title, message string)

RenderErrorPage - Rendering error page for client

func RenderTemplate

func RenderTemplate(w http.ResponseWriter, tmpl string, vars interface{})

RenderTemplate - Render template by template name

Types

type ErrorPage

type ErrorPage struct {
	Title   string
	Message string
}

ErrorPage - using for Render Error Page

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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