patterns

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

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