io

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 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 io ships process-stdio primitives: io.stdin reads newline-delimited items from standard input; io.stdout and io.stderr write each item as a line and pass it through. The io.write_text action writes raw rendered text to stdout and passes its input through. Neither sink owns the stream — the CLI still writes the final payload to stdout.

Index

Constants

View Source
const ID = "io"

Variables

View Source
var WriteTextAction = action.New("io.write_text", func(_ context.Context, input map[string]any) (map[string]any, error) {
	return writeTextInput(os.Stdout, input)
}).
	Description("Write raw text to stdout and pass the input through").
	Tag("io", "stdout", "text").
	Build()

WriteTextAction writes already-rendered text to stdout and passes the input through.

Functions

func Bundle

func Bundle(_ map[string]string) compiler.Bundle

func InSource

func InSource() action.AnyStreamAction

InSource returns the io.stdin stream source reading process stdin.

func Library

func Library() action.Library

func StderrOperator

func StderrOperator() action.NamedOperator

StderrOperator returns io.stderr: each item is written as a line to stderr and passed through unchanged.

func StdoutOperator

func StdoutOperator() action.NamedOperator

StdoutOperator returns io.stdout: each item is written as a line to stdout and passed through unchanged.

Types

type InConfig

type InConfig struct {
	// Format selects the decoder for each line. "lines" (default) yields
	// raw strings; "ndjson" parses one JSON value per line.
	Format string `json:"format" cli:"format"`
}

InConfig controls io.stdin's per-line decoding.

Jump to

Keyboard shortcuts

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