tmpl

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tmpl provides template rendering utilities for shell commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ScriptPaths  map[string]string // "hive-tmux" -> "/path/to/bin/hive-tmux"
	AgentCommand string            // default profile command (e.g., "claude")
	AgentWindow  string            // default profile key / tmux window name
	AgentFlags   string            // shell-quoted flags string
}

Config holds all template rendering context.

type Renderer

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

Renderer renders Go templates with shell-oriented helper functions.

func New

func New(cfg Config) *Renderer

New creates a Renderer with the given config baked into template functions.

func NewValidation

func NewValidation() *Renderer

NewValidation creates a Renderer with safe defaults for template syntax checking. Template functions return placeholder values — output is discarded, only parse errors matter.

func (*Renderer) Render

func (r *Renderer) Render(tmpl string, data any) (string, error)

Render executes a Go template string with the given data.

Jump to

Keyboard shortcuts

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