source

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasStdinBytes

func HasStdinBytes() bool

Checks if stdin has data available (not a TTY).

func Mount

func Mount(path string) (spool.FileSystem, error)

Mounts local or S3 filesystem based on path prefix.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder creates iosystem.Source instances from CLI flags. Supports stdin, files, and merge modes.

func New

func New() *Builder

New creates a source builder.

func (*Builder) Build

func (b *Builder) Build() (iosystem.Source, error)

Build creates the source based on configuration.

func (*Builder) Files

func (b *Builder) Files(dir string, paths ...string) *Builder

Files sets the input to read from file paths. Multiple files will be read sequentially unless Merge is enabled.

func (*Builder) Merge

func (b *Builder) Merge(enable bool) *Builder

Merge enables merge mode - all files are concatenated into a single document. Only applies when multiple files are specified.

func (*Builder) None

func (b *Builder) None() *Builder

func (*Builder) Path

func (b *Builder) Path(path string) *Builder

Path sets the input to read from files from dir path.

func (*Builder) Stdin

func (b *Builder) Stdin() *Builder

Stdin sets the input to read from stdin. If reader is nil, os.Stdin is used.

Jump to

Keyboard shortcuts

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