Documentation
¶
Overview ¶
Package hook provides access to hook message templates and the hook registry from embedded assets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Message ¶
Message reads a hook message template by hook name and filename.
Parameters:
- hook: Hook directory name (e.g., "qa-reminder")
- filename: Template filename (e.g., "gate.txt")
Returns:
- []byte: Template content from hooks/messages/<hook>/
- error: Non-nil if the file is not found or read fails
func MessageList ¶
MessageList returns available hook message directory names.
Each hook is a directory under hooks/messages/ containing one or more variant .txt template files.
Returns:
- []string: List of hook directory names
- error: Non-nil if directory read fails
func MessageRegistry ¶
MessageRegistry reads the embedded registry.yaml that describes all hook message templates.
Returns:
- []byte: Raw YAML content
- error: Non-nil if the file is not found or read fails
func VariantList ¶
VariantList returns available variant filenames for a hook.
Parameters:
- hook: Hook directory name (e.g., "qa-reminder")
Returns:
- []string: List of variant filenames (e.g., "gate.txt")
- error: Non-nil if the hook directory is not found or read fails
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.