testcontext

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t *testing.T) context.Context

New creates a new context with test logger for testing.

func NewWithCancel

func NewWithCancel(t *testing.T) (context.Context, context.CancelFunc)

NewWithCancel creates a new cancellable context with test logger for testing.

func NewWithDeadline

func NewWithDeadline(t *testing.T, duration time.Duration) (context.Context, context.CancelFunc)

NewWithDeadline creates a new deadline context based on the given duration, with test logger for testing.

func Wrap

Wrap wraps a context with test logger for testing and returns the context with cancel function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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