20 lines
587 B
Go
20 lines
587 B
Go
package step
|
|
|
|
import "html/template"
|
|
|
|
// FuncProvider provides a template.FuncMap.
|
|
type FuncProvider interface {
|
|
// FuncMap provides a template.FuncMap. It may return nil, in which case
|
|
// its result is simply not considered.
|
|
FuncMap () template.FuncMap
|
|
}
|
|
|
|
// FuncProviderFor is an object that provides a template.FuncMap for a specific
|
|
// document.
|
|
type FuncProviderFor interface {
|
|
FuncProvider
|
|
// FuncMap provides a template.FuncMap, given a particular document. It
|
|
// may return nil, in which case its result is simply not considered.
|
|
FuncMapFor (*Document) template.FuncMap
|
|
}
|