Documentation
¶
Overview ¶
Package notify implements the "notify" built-in hook, which sends a desktop notification on each subscribed lifecycle event. The OS backend is selected at runtime:
- macOS: osascript with a display-notification AppleScript one-liner
- Linux: notify-send
- other: silently no-ops
The system command is dispatched through an injectable Runner so the hook can be tested without spawning OS processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMessage ¶
BuildMessage constructs the human-readable notification body from the event and its context environment variables.
func DefaultRunner ¶
DefaultRunner is the production Runner that execs the OS notification tool. On failure the combined stdout+stderr output is captured (truncated via hooksreg.TruncateOutput) and included in the returned error so the actual cause is visible instead of a bare "exit status 1".
Types ¶
Source Files
¶
- notify.go