stdout

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package stdout implements a mock emitter that writes the evaluation results as JSON to a writer (os.Stdout by default). It is mainly useful for tests and for manually inspecting what would be published. It is not wired into LoadDefaultEmitterTypes; tests that need it register it explicitly.

Index

Constants

View Source
const TypeMoniker = "stdout"

TypeMoniker is the moniker used to select this emitter in an initstring.

Variables

This section is empty.

Functions

func Build

func Build(string) (publisher.Emitter, error)

Build constructs a stdout emitter. The init string is ignored; results are written to os.Stdout.

Types

type Emitter

type Emitter struct {
	Writer io.Writer
}

Emitter writes the results as indented JSON to Writer.

func New

func New() *Emitter

New returns a stdout emitter writing to os.Stdout.

func (*Emitter) Emit

func (e *Emitter) Emit(_ context.Context, results papi.Results, _ ...publisher.EmitOpt) error

Emit writes the results to the configured writer as indented JSON.

Jump to

Keyboard shortcuts

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