Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context[T any] interface { Inject(ctx context.Context, value T) context.Context From(ctx context.Context) T MayFrom(ctx context.Context) (T, bool) }
func New ¶
func New[T any](optFns ...OptionFunc[T]) Context[T]
type OptionFunc ¶
type OptionFunc[T any] func(c *ctx[T])
func WithDefaults ¶
func WithDefaults[T any](v T) OptionFunc[T]
func WithDefaultsFunc ¶
func WithDefaultsFunc[T any](defaultsFunc func() T) OptionFunc[T]
Click to show internal directories.
Click to hide internal directories.