template

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoTemplateEngine

func NewGoTemplateEngine(opts ...TemplateOption) ports.TemplateEngine

NewGoTemplateEngine creates a new GoTemplateEngine.

Types

type GoTemplateEngine

type GoTemplateEngine struct {
	// contains filtered or unexported fields
}

GoTemplateEngine implements TemplateEngine using standard text/template.

func (*GoTemplateEngine) Render

func (e *GoTemplateEngine) Render(raw []byte, config map[string]interface{}) ([]byte, error)

Render processes the raw manifest bytes with the provided config.

type TemplateOption

type TemplateOption func(*templateConfig)

TemplateOption configures a GoTemplateEngine.

func WithStrict

func WithStrict(enabled bool) TemplateOption

WithStrict enables/disables strict mode for missing keys. When enabled (default), template rendering fails if a referenced key is missing.

Jump to

Keyboard shortcuts

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