Documentation
¶
Index ¶
- func ParseFlags(args []string, stderr io.Writer) (config.Defaults, []string, error)
- func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int
- func RunContext(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) int
- func RunWithOptions(ctx context.Context, cfg config.Defaults, inputs []io.ReadCloser, ...) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFlags ¶ added in v0.8.1
ParseFlags parses command-line arguments and returns a populated config.Defaults along with any remaining positional file paths. Callers can pass the result directly to RunWithOptions after opening the input files.
func RunContext ¶
RunContext parses args, opens any file paths, and runs the pipeline. It is a convenience wrapper around ParseFlags and RunWithOptions, suitable for use in tests and as a backward-compatible entry point.
func RunWithOptions ¶ added in v0.8.1
func RunWithOptions(ctx context.Context, cfg config.Defaults, inputs []io.ReadCloser, stdout, stderr io.Writer) int
RunWithOptions runs the processing pipeline with pre-parsed options and pre-opened input readers. The caller is responsible for closing the readers. This is the primary library entry point for callers that want to supply their own flag parsing or file opening logic.
Types ¶
This section is empty.