tmpl

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(s string, v Vars) string

Expand replaces template placeholders in s with runtime values. {profile} → profile name as-is, {Profile} → title-cased, {command} → wrapped command string, {duration} → compact elapsed time, {Duration} → spoken elapsed time.

func TitleCase

func TitleCase(s string) string

TitleCase uppercases the first byte of s.

Types

type Vars added in v0.2.0

type Vars struct {
	Profile     string
	Command     string
	Duration    string // compact: "2m15s"
	DurationSay string // spoken: "2 minutes and 15 seconds"
}

Vars holds runtime values for template expansion.

Jump to

Keyboard shortcuts

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