tpl

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tpl provides embedded template files for initializing .context/ directories.

Index

Constants

This section is empty.

Variables

Functions

func ClaudeCommandByName

func ClaudeCommandByName(name string) ([]byte, error)

ClaudeCommandByName reads a Claude Code slash command template by name.

Parameters:

  • name: Command filename (e.g., "ctx-status.md")

Returns:

  • []byte: Command template content from claude/commands/
  • error: Non-nil if the file not found or read fails

func ClaudeHookByFileName

func ClaudeHookByFileName(name string) ([]byte, error)

ClaudeHookByFileName reads a Claude Code hook script by name.

Parameters:

  • name: Hook script filename (e.g., "session-end-auto-save.sh")

Returns:

  • []byte: Hook script content from claude/hooks/
  • error: Non-nil if the file is not found or read fails

func Entry

func Entry(name string) ([]byte, error)

Entry reads an entry template by name.

Parameters:

  • name: Template filename (e.g., "decision.md")

Returns:

  • []byte: Template content from entry-templates/
  • error: Non-nil if the file is not found or read fails

func List

func List() ([]string, error)

List returns all available template file names.

Returns:

  • []string: List of template filenames in the root templates directory
  • error: Non-nil if directory read fails

func ListClaudeCommands

func ListClaudeCommands() ([]string, error)

ListClaudeCommands returns available Claude Code slash command file names.

Returns:

  • []string: List of command filenames in claude/commands/
  • error: Non-nil if directory read fails

func ListEntry

func ListEntry() ([]string, error)

ListEntry returns available entry template file names.

Returns:

  • []string: List of template filenames in entry-templates/
  • error: Non-nil if directory read fails

func Template

func Template(name string) ([]byte, error)

Template reads a template file by name from the embedded filesystem.

Parameters:

  • name: Template filename (e.g., "TASKS.md")

Returns:

  • []byte: Template content
  • error: Non-nil if the file is not found or read fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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