2022-02-15 01:05:08 +00:00
2022-02-15 01:05:08 +00:00
2022-02-14 18:05:16 +00:00
2022-02-14 18:05:16 +00:00
2022-02-14 18:05:16 +00:00
2022-02-14 18:06:42 +00:00
2022-02-15 01:05:08 +00:00
2022-02-14 17:48:13 +00:00
2022-02-15 01:05:08 +00:00

gomockctx

Go package with gomock helpers for matching context.Context.

Go Reference Actions Status Coverage GitHub issues GitHub pull requests License Status

Import

import "github.com/romdo/gomockctx"

Usage

// Create a context with a gomockctx ID value.
ctx := gomockctx.New(context.Background())

// Match against a context with a gomockctx ID.
someMock.EXPECT().
	Get(gomockctx.Is(ctx), "foo").
	Return("bar", nil)

// Use context with gomockctx ID when calling function.
someMock.Get(ctx, "foo")

Documentation

Please see the Go Reference.

License

MIT

Description
Go package with gomock helpers for matching context.Context.
Readme MIT 158 KiB
Languages
Go 82%
Makefile 18%