Documentation ¶
Overview ¶
Provides a set of tools and syntax sugar context.
Index ¶
- func Add[T constraints.Integer | constraints.Float | ~string | ~bool](ctx context.Context, key string, value T) context.Context
- func Delete(ctx context.Context, key string)
- func FromContext(ctx context.Context) context.Context
- func Get[T constraints.Integer | constraints.Float | ~string | ~bool](ctx context.Context, key string) (T, bool)
- func GetKeys(ctx context.Context) (keys []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add[T constraints.Integer | constraints.Float | ~string | ~bool](ctx context.Context, key string, value T) context.Context
Add Add a new value into context
func FromContext ¶
FromContext Creates a new child context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.