hook

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook[T any] func(next T) T

func Chain

func Chain[T any](hooks ...Hook[T]) Hook[T]

func Prepend

func Prepend[T any](previous Hook[T], chain ...Hook[T]) Hook[T]

Prepend returns a hook function that first runs the given previous hook and then runs the remaining hooks in the chain. When executed, previous hook will be the first one to process the value, despite being appended to the end of the slice internally (since hooks are executed in reverse order).

Jump to

Keyboard shortcuts

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