Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectGoTemplateMiddleware ¶
type ObjectGoTemplateMiddleware struct {
// contains filtered or unexported fields
}
func NewObjectGoTemplateMiddleware ¶
func NewObjectGoTemplateMiddleware( templateStrings map[types.FieldName]string, ) (*ObjectGoTemplateMiddleware, error)
NewObjectGoTemplateMiddleware creates a new template firmware used to process individual objects.
It will render the template for each object and return a single field.
TODO(manuel, 2023-02-02) Add support for passing in custom funcmaps See #110 https://github.com/go-go-golems/glazed/issues/110
func (*ObjectGoTemplateMiddleware) Process ¶
func (rgtm *ObjectGoTemplateMiddleware) Process(object map[string]interface{}) ([]map[string]interface{}, error)
Process will render each template for the input object and return an object with the newly created fields.
TODO(manuel, 2022-11-21) This should allow merging the new results straight back
Click to show internal directories.
Click to hide internal directories.