Help us shape the future of Go! Take the 2026 Go Developer Survey

input

package
v1.40.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPiped

func IsPiped(file *os.File) bool

IsPiped reports whether a borrowed file should be treated as piped request input. Empty pipes attached by terminals and editors need a short readiness probe; classification never reads from or closes the file.

func ReadFile

func ReadFile(ctx context.Context, file *os.File, data []byte) (int, error)

ReadFile preserves the caller's descriptor flags and deadlines. Pipe input needs an exclusive consumer: another descriptor or process could otherwise drain a blocking pipe between its readiness event and read.

Types

This section is empty.

Jump to

Keyboard shortcuts

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