Rename plugin.go to provider.go in accordance with #12

This commit is contained in:
2024-12-09 19:32:45 -05:00
parent adcb195f78
commit 952ce8f184

26
provider.go Normal file
View File

@@ -0,0 +1,26 @@
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
}
// Configurable is an object that can be configured according to metadata.
type Configurable interface {
// Configure uses config to configure the object. It must not modify
// config. Keys are namespaced with a '.' and are written in kebab case.
Configure (config Meta) error
}