templates

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 4 Imported by: 0

README

templates

Simple template render object for use with hypermedia webservers.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int64ToTimestamp added in v0.1.3

func Int64ToTimestamp(i int64) string

func int64 to timestamp

Types

type HttpError added in v0.1.4

type HttpError struct {
	Code    int
	Title   string
	Message string
}

func (*HttpError) Render added in v0.1.4

func (e *HttpError) Render(w http.ResponseWriter, t *Templates, name string)

type Templates

type Templates struct {
	// contains filtered or unexported fields
}

func NewTemplate

func NewTemplate(glob string) *Templates

func (*Templates) Render

func (t *Templates) Render(w io.Writer, name string, data any) error

Jump to

Keyboard shortcuts

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