skip

package
v2.12.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package skip can skip an entire Action.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Maybe

func Maybe(skipper any, next middleware.Action) middleware.Action

Maybe returns an action that skips immediately if the given p is a Skipper and its Skip method returns true.

Types

type ErrSkipper

type ErrSkipper interface {
	// Skip returns true if the Piper should be skipped.
	Skip(ctx *context.Context) (bool, error)
	fmt.Stringer
}

ErrSkipper defines a method to skip an entire Piper.

type Skipper

type Skipper interface {
	// Skip returns true if the Piper should be skipped.
	Skip(ctx *context.Context) bool
	fmt.Stringer
}

Skipper defines a method to skip an entire Piper.

Jump to

Keyboard shortcuts

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