source

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package source handles input resolution for clai.

Sources are file paths or stdin. Multiple file sources are resolved concurrently and joined in the order they were specified.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	Stdin  io.Reader
	Stderr io.Writer // for warnings (e.g., ContinueOnError)
}

Input handles reading from stdin and resolving input sources.

func (*Input) IsStdinTerminal

func (in *Input) IsStdinTerminal() bool

IsStdinTerminal reports whether Stdin is an interactive terminal.

func (*Input) Resolve

func (in *Input) Resolve(paths []string, cfg *config.Config) ([]byte, error)

Resolve reads and concatenates all input sources concurrently. Returns nil if no sources are given and stdin is a terminal.

Jump to

Keyboard shortcuts

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