hook

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

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

func Prepend

func Prepend[T any](previous func(next T) T, chain ...func(next T) T) func(next T) 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).

Types

This section is empty.

Jump to

Keyboard shortcuts

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