template

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(tmpl string, data interface{}) (string, error)

String converts a template to a string

func Writer

func Writer(out io.Writer, tmpl string, data interface{}) error

Writer outputs a template to an io.Writer

Types

type TimeFuncs

type TimeFuncs struct{}

TimeFuncs wraps all time based templates

func (*TimeFuncs) Now

func (t *TimeFuncs) Now() time.Time

Now returns current time

func (*TimeFuncs) Parse

func (t *TimeFuncs) Parse(layout string, value string) (time.Time, error)

Parse parses the current time according to layout

Jump to

Keyboard shortcuts

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