template

package
v0.1.0-dev.20260314201016 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package template provides template expansion actions for the operation graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	op.ProviderBase
}

Provider provides template expansion actions.

It takes input content and produces output content through Go template expansion — no filesystem access.

+devlore:access=both

func NewProvider

func NewProvider(ctx op.Context) *Provider

func (*Provider) Render

func (p *Provider) Render(templateData map[string]any, source, path, project string, content []byte) ([]byte, error)

Render processes content as a Go text/template. Returns the rendered bytes.

Parameters:

  • templateData: Key-value pairs available as template variables
  • source: Source file path (available as .Source in the template)
  • path: Target file path (available as .Target in the template)
  • project: Project name (available as .Project in the template)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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