Documentation
¶
Overview ¶
Package debug provides debugging utilities for Kafui. This package is only included in debug builds. This is a stub implementation for production builds.
Index ¶
Constants ¶
View Source
const KeycastEnabled = false
KeycastEnabled reports whether this build renders the strip.
Variables ¶
This section is empty.
Functions ¶
func Capture ¶
func Capture(view string, options CaptureOptions) (string, error)
Capture is a stub implementation that returns an error in production builds
func CaptureWithFormat ¶
func CaptureWithFormat(view string, options CaptureOptions) (string, error)
CaptureWithFormat is a stub implementation for production builds
func StripANSICodes ¶
StripANSICodes removes ANSI escape codes from a string
Types ¶
type CaptureOptions ¶
type CaptureOptions struct {
// Format is the output format (plain text or ANSI)
Format ScreenshotFormat
// Redact enables sensitive data redaction
Redact bool
// OutputDir is the directory to save screenshots (defaults to temp dir)
OutputDir string
// Version is the application version
Version string
// CurrentPage is the current page name
CurrentPage string
// PageContext provides additional context about the current page
PageContext string
// TerminalWidth is the terminal width
TerminalWidth int
// TerminalHeight is the terminal height
TerminalHeight int
}
CaptureOptions holds options for screenshot capture
type Keycast ¶ added in v0.1.35
type Keycast struct{}
Keycast is the production no-op. The strip is a debugging and demo-recording aid, so it costs nothing in a release build.
type ScreenshotFormat ¶
type ScreenshotFormat int
ScreenshotFormat represents the output format for screenshots
const ( // FormatPlainText outputs plain text without ANSI codes FormatPlainText ScreenshotFormat = iota // FormatANSI outputs text with ANSI color codes preserved FormatANSI )
Click to show internal directories.
Click to hide internal directories.