Documentation
¶
Overview ¶
Package patterns provides reusable patterns for pdf-cli commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StdioHandler ¶
type StdioHandler struct {
InputArg string
ExplicitOutput string
ToStdout bool
DefaultSuffix string
Operation string
// contains filtered or unexported fields
}
StdioHandler manages stdin/stdout for commands that support pipelines.
func (*StdioHandler) Cleanup ¶
func (h *StdioHandler) Cleanup()
Cleanup releases all resources. Safe to call multiple times.
func (*StdioHandler) Finalize ¶
func (h *StdioHandler) Finalize() error
Finalize writes output to stdout if needed. Call this after the operation succeeds.
func (*StdioHandler) InputPath ¶
func (h *StdioHandler) InputPath() string
InputPath returns the resolved input path.
func (*StdioHandler) OutputPath ¶
func (h *StdioHandler) OutputPath() string
OutputPath returns the resolved output path.
func (*StdioHandler) Setup ¶
func (h *StdioHandler) Setup() (input, output string, err error)
Setup prepares input and output paths, handling stdin/stdout as needed. Returns input path, output path, and error. Call Cleanup() when done, regardless of success or failure.
Click to show internal directories.
Click to hide internal directories.