template

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

template

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChineseDate

func ChineseDate(t time.Time) string

func Javascript added in v0.0.6

func Javascript(data interface{}) template.JS

func RMB

func RMB(v float64) string

Types

type Option

type Option func(*Template)

func Delims

func Delims(left string, right string) Option

func Dir

func Dir(dir string) Option

func Extension

func Extension(ext string) Option

func Function

func Function(name string, fn interface{}) Option

func Name

func Name(name string) Option

func NameByPath

func NameByPath(flag bool) Option

type Template

type Template struct {
	*template.Template
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Template

func (*Template) AddFunc

func (t *Template) AddFunc(name string, fn interface{})

func (*Template) Find

func (t *Template) Find(uri string) (string, error)

func (*Template) Open

func (t *Template) Open() error

Jump to

Keyboard shortcuts

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