terminator

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 3 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.

Documentation

Overview

Package terminator defines the Terminator interface, for special transforms that filter out the tail of a list of commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Terminator

type Terminator interface {
	transform.Transform

	// Add relaxes the termination limit to pass-through all commands before and
	// including the command or subcommand.
	Add(context.Context, api.CmdID, api.SubCmdIdx) error
}

Terminator is an Transformer that prevents commands passing-through it after a certain point in the stream.

func NewEarlyTerminator

func NewEarlyTerminator() Terminator

NewEarlyTerminator returns a Terminator that will consume all commands after the last command passed to Add.

Jump to

Keyboard shortcuts

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