notify

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package notify provides OS desktop notification support and webhook notifications. Desktop notifications dispatch to platform-native tools (notify-send on Linux, osascript on macOS) and silently ignore unsupported platforms or missing tools. Webhook notifications support Slack and Discord incoming webhook URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(title, body string)

Send fires a desktop notification with the given title and body. Errors are silently swallowed — notifications are best-effort and must never interrupt or fail the main orchestration loop.

func SendWebhook

func SendWebhook(webhookURL, title, body string) error

SendWebhook sends a rich notification to a Slack, Discord, or custom HTTP webhook URL. The format is auto-detected from the URL:

  • hooks.slack.com → Slack attachments format
  • discord.com/api/webhooks → Discord embeds format
  • anything else → generic JSON: {"title":"...","body":"...","source":"cloop"}

Errors are returned; callers should treat them as best-effort and not block the main orchestration flow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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