Documentation ¶
Index ¶
- type Templater
- func (r *Templater) Err() error
- func (r *Templater) Replace(str string) string
- func (r *Templater) ReplaceGlobs(globs []*ast.Glob) []*ast.Glob
- func (r *Templater) ReplaceSlice(strs []string) []string
- func (r *Templater) ReplaceVars(vars *ast.Vars) *ast.Vars
- func (r *Templater) ReplaceVarsWithExtra(vars *ast.Vars, extra map[string]any) *ast.Vars
- func (r *Templater) ReplaceWithExtra(str string, extra map[string]any) string
- func (r *Templater) ResetCache()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Templater ¶
Templater is a help struct that allow us to call "replaceX" funcs multiple times, without having to check for error each time. The first error that happen will be assigned to r.err, and consecutive calls to funcs will just return the zero value.
func (*Templater) ReplaceSlice ¶
func (*Templater) ReplaceVarsWithExtra ¶
func (*Templater) ReplaceWithExtra ¶
func (*Templater) ResetCache ¶
func (r *Templater) ResetCache()
Click to show internal directories.
Click to hide internal directories.