Documentation
¶
Overview ¶
Package actions provides post-generation output actions: clipboard copy, browser open, and file download.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BrowserOpen = browser.OpenURL
BrowserOpen is a function variable for opening URLs (swappable in tests).
var ClipboardUnsupported = clipboard.Unsupported
ClipboardUnsupported mirrors clipboard.Unsupported (swappable in tests).
var ClipboardWrite = clipboard.WriteAll
ClipboardWrite is a function variable for clipboard writes (swappable in tests).
var ErrClipboardUnsupported = errors.New("clipboard not supported on this platform")
ErrClipboardUnsupported indicates the platform has no clipboard support.
var ErrHTTPStatus = errors.New("unexpected HTTP status")
ErrHTTPStatus indicates the server returned a non-200 status code.
Functions ¶
func AutoFilename ¶
AutoFilename extracts a filename from a meme URL path. Falls back to "meme.jpg" if parsing fails or path is empty.
func CopyToClipboard ¶
CopyToClipboard copies text to the system clipboard. Returns a descriptive error if clipboard is unsupported on the platform.
func DownloadFile ¶
DownloadFile downloads the resource at rawURL and saves it to destPath. Uses plain http.Get since meme URLs are public CDN resources.
func OpenInBrowser ¶
OpenInBrowser opens the given URL in the default browser.
Types ¶
This section is empty.