template

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Brainstorm = "brainstorm"
	Meeting    = "meeting"
	Lecture    = "lecture"
	Notes      = "notes"
)

Template name constants. Use these instead of string literals for compile-time safety.

Variables

View Source
var (
	BrainstormName = Name{/* contains filtered or unexported fields */}
	MeetingName    = Name{/* contains filtered or unexported fields */}
	LectureName    = Name{/* contains filtered or unexported fields */}
	NotesName      = Name{/* contains filtered or unexported fields */}
)

Pre-parsed template name constants for use in code. These avoid parsing overhead and provide compile-time safety.

View Source
var ErrUnknown = errors.New("unknown template")

ErrUnknown indicates an invalid template name was specified.

Functions

func Get deprecated

func Get(name string) (string, error)

Get returns the prompt for the given template name. Returns ErrUnknown if the name is not recognized.

Deprecated: Use ParseName(name).Prompt() instead.

func Names

func Names() []string

Names returns the list of available template names. The order is stable and matches the spec (brainstorm, meeting, lecture).

Types

type Name added in v0.3.0

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

Name represents a validated template name. Zero value is invalid and must not be used with Prompt(). Use ParseName to create from user input, or the pre-parsed constants.

func MustParseName added in v0.3.0

func MustParseName(s string) Name

MustParseName parses a template name, panicking if invalid. Use only for compile-time constants and tests.

func ParseName added in v0.3.0

func ParseName(s string) (Name, error)

ParseName validates and parses a template name string. Returns ErrUnknown if the name is not recognized. Empty string returns an error (unlike Language where empty means auto-detect).

func (Name) IsZero added in v0.3.0

func (n Name) IsZero() bool

IsZero returns true if this is the zero value (no template set). Unlike Language.IsZero() which represents valid "auto-detect" mode, Name.IsZero() indicates no template was specified. In CLI commands, this means "skip restructuring" (raw transcript output). Calling Prompt() on a zero Name will panic.

func (Name) Prompt added in v0.3.0

func (n Name) Prompt() string

Prompt returns the prompt string for this template. Panics if called on zero value.

func (Name) String added in v0.3.0

func (n Name) String() string

String returns the template name string. Returns empty string for zero value.

Jump to

Keyboard shortcuts

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