template

package
v0.0.0-...-82ef3d0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithData

func ContextWithData(ctx context.Context, p *Data) context.Context

ContextWithData adds data to a context.

Types

type Data

type Data struct {
	FlashMessage *flash.Message
	Mode         string
	Title        string
	Auth         bool
	TodosDone    []todo.Todo
	TodosNotDone []todo.Todo
}

Data is the data used in the rendered templates.

func DataFromContext

func DataFromContext(ctx context.Context) *Data

DataFromContext gets data from a context.

Jump to

Keyboard shortcuts

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