contextlib

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 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 GetValue added in v1.0.8

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

func SetValue added in v1.0.8

func SetValue(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

Jump to

Keyboard shortcuts

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