command

package module
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 5 Imported by: ? 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.

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Emit

func Emit(opts ...any) gloo.Source[[]byte]

Emit returns a Source that emits fixed content. The stdout content is split on newlines and emitted as the output stream; optional stderr content is written to a stderr destination (os.Stderr by default) as a side effect when the source runs. It is handy for seeding and testing pipelines.

Call shapes:

Emit("line1\nline2")                                  // stdout only
Emit("out", EmitStderr("warning"))                    // stdout + stderr
Emit("out", EmitStderr("warning"), EmitStderrTo(&buf)) // capture stderr

Types

type EmitStderr

type EmitStderr string

EmitStderr sets content written to the stderr destination.

type EmitStderrDest

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

EmitStderrDest overrides where stderr content is written (default os.Stderr).

func EmitStderrTo

func EmitStderrTo(w io.Writer) EmitStderrDest

EmitStderrTo redirects emitted stderr content to w. Useful in tests.

type EmitStdout

type EmitStdout string

EmitStdout sets the stdout content. A bare string passed to Emit is treated the same way; this typed form is for disambiguation.

Jump to

Keyboard shortcuts

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