input

package
v0.47.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 7 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 input provides helpers for reading flag values from stdin and files.

Index

Constants

This section is empty.

Variables

View Source
var ErrStdinAlreadyUsed = errors.New("stdin already used")

ErrStdinAlreadyUsed is returned when multiple flags try to consume stdin.

Functions

func ExpandFlagValues

func ExpandFlagValues(values []string, stdinUsed bool) ([]string, bool)

ExpandFlagValues expands flag values that use - (stdin) or @file syntax. Returns the expanded values and whether stdin was consumed.

func ReadLinesFromReader

func ReadLinesFromReader(r io.Reader) []string

ReadLinesFromReader reads non-empty lines from a reader.

func ReadText added in v0.44.0

func ReadText(source string, stdin io.Reader, stdinUsed bool) (string, bool, error)

ReadText preserves the full contents of a file or stdin as a single block. The special source "-" reads from stdin exactly once.

Types

This section is empty.

Jump to

Keyboard shortcuts

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