helpers

package
v0.0.0-...-c5b8c6d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderName = "header"
	FooterName = "footer"
)

Variables

This section is empty.

Functions

func HashString

func HashString(input string) string

Hashing an input string as MD5

func LoadTemplate

func LoadTemplate(name string) (*template.Template, error)

Loading a template safely (just by name)

func LoadTemplateUnsafe

func LoadTemplateUnsafe(name string) *template.Template

Loading a template unsafely (just by name)

func ParseMarkdown

func ParseMarkdown(input string) string

Parsing markdown into an HTML-ey file

func SendPage

func SendPage(w io.Writer, name string, data interface{}) error

Sending a file with the header and footer templates included

Types

type Page

type Page struct {
	Name string
	Data interface{}
}

The Page type (for injecting data)

Jump to

Keyboard shortcuts

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