contextlib

package
v1.14.10 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package contextlib provides tools for easy and quick work with context.Context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueFromContext added in v1.5.2

func ValueFromContext[T any](ctx context.Context, key string) (T, error)

func WithValue added in v1.5.2

func WithValue(ctx context.Context, key string, value any) context.Context

Types

type ValueNotFoundError added in v1.0.8

type ValueNotFoundError struct {
	Message string
	BaseErr error
}

func (ValueNotFoundError) Error added in v1.0.8

func (e ValueNotFoundError) Error() string

func (ValueNotFoundError) Unwrap added in v1.2.11

func (e ValueNotFoundError) Unwrap() error

Jump to

Keyboard shortcuts

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