printed

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 3 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 printed holds what a command prints when the daemon runs it for a client: the client prints it, so a command served over the API prints the bytes it printed in process.

Index

Constants

View Source
const (
	KindHeader  = "F10-Error"
	KindOutside = "outside-herdr"
)

KindHeader names a refusal a caller tells apart by kind rather than by its words: KindOutside is a caller outside Herdr.

View Source
const ExitHeader = "F10-Exit"

ExitHeader carries a command's exit code on its error, which Connect has no field for, so the CLI exits with the code it exited with in process.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Err            error
	Stdout, Stderr string
}

An Error is a failure after the command printed something.

func Of

func Of(err error) (*Error, bool)

Of is the output err carries, and whether it carries one.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Output

type Output struct {
	Stdout render.LinkBuffer
	Stderr bytes.Buffer
}

Output is one call's stdout and stderr. Stdout links task ids and paths when the client's own stdout is a terminal, since the client copies it there unchanged.

func New

func New(terminal bool) *Output

New is an empty output for a client whose stdout is a terminal or not.

func (*Output) Wrap

func (o *Output) Wrap(err error) error

Wrap carries what o holds on err, so a client prints it before the error as the command did; nil stays nil.

Jump to

Keyboard shortcuts

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