contextext

package
v0.1.40 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext[K comparable, V any](ctx context.Context, key K) (V, bool)

FromContext returns the value associated with the given key in the context, or nil if no value is associated with the key.

func NewContext

func NewContext[K comparable, V any](ctx context.Context, key K, value V) context.Context

NewContext returns a new Context that carries value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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