package hcontext
import "github.com/gohugoio/hugo/common/hcontext"
Index ¶
Types ¶
type ContextDispatcher ¶
type ContextDispatcher[T any] interface { Set(ctx context.Context, value T) context.Context Get(ctx context.Context) T }
ContextDispatcher is a generic interface for setting and getting values from a context.
func NewContextDispatcher ¶
func NewContextDispatcher[T any, R comparable](key R) ContextDispatcher[T]
NewContextDispatcher creates a new ContextDispatcher with the given key.
Source Files ¶
- Version
- v0.144.2 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 8 hours ago –
Tools for package owners.