contextx

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func For

func For(ctx context.Context, v interface{}) error

For unmarshals ctx into v.

func ShrinkDeadline

func ShrinkDeadline(ctx context.Context, timeout time.Duration) (context.Context, func())

ShrinkDeadline returns a new Context with proper deadline base on the given ctx and timeout. And returns a cancel function as well.

func ValueOnlyFrom

func ValueOnlyFrom(ctx context.Context) context.Context

ValueOnlyFrom takes all values from the given ctx, without deadline and error control.

Types

This section is empty.

Jump to

Keyboard shortcuts

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