Documentation
¶
Index ¶
Constants ¶
View Source
const ( FuncDerefString = "derefString" FuncLink = "link" )
Variables ¶
This section is empty.
Functions ¶
func DefaultFuncMap ¶ added in v0.1.389
DefaultFuncMap returns the default template function map.
func DerefString ¶ added in v0.1.389
DerefString returns the string value or empty if nil.
Types ¶
type Client ¶
type Client interface {
Blackbox
contract.TemplateOperator
}
func NewClient ¶
func NewClient(opts ClientOptions) (Client, error)
type ClientOption ¶
type ClientOption = contract.Opt[ClientOptions]
func WithTemplatesFS ¶
func WithTemplatesFS(x fs.FS) ClientOption
func WithTemplatesPath ¶
func WithTemplatesPath(x string) ClientOption
type ClientOptions ¶
func ApplyClientOptions ¶
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) Render ¶
func (d *DefaultTool) Render(ctx context.Context, opts contract.RenderOptions) error
Render renders a template with the given options.
type Tool ¶
type Tool interface {
contract.TemplateOperator
}
Click to show internal directories.
Click to hide internal directories.