gocontext

package
v0.0.0-...-e92e447 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Provides a set of tools and syntax sugar context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

Add Add a new value into context

func Delete

func Delete(ctx context.Context, key string)

Delete Remove a context value

func FromContext

func FromContext(ctx context.Context) context.Context

FromContext Creates a new child context

func Get

func Get[T constraints.Integer | constraints.Float | ~string | ~bool](ctx context.Context, key string) (T, bool)

Get Get a value from context

func GetKeys

func GetKeys(ctx context.Context) (keys []string)

GetKeys Get all context keys

Types

This section is empty.

Jump to

Keyboard shortcuts

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