mirror of
https://github.com/romdo/gomockctx.git
synced 2026-02-19 08:06:40 +00:00
docs: change Is() to Eq()
This commit is contained in:
@@ -34,7 +34,7 @@ ctx := gomockctx.New(context.Background())
|
|||||||
|
|
||||||
// Match against a context with a gomockctx ID.
|
// Match against a context with a gomockctx ID.
|
||||||
someMock.EXPECT().
|
someMock.EXPECT().
|
||||||
Get(gomockctx.Is(ctx), "foo").
|
Get(gomockctx.Eq(ctx), "foo").
|
||||||
Return("bar", nil)
|
Return("bar", nil)
|
||||||
|
|
||||||
// Use context with gomockctx ID when calling function.
|
// Use context with gomockctx ID when calling function.
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ func getValue(ctx context.Context) contextValue {
|
|||||||
|
|
||||||
// New returns a context as a child of the given parent, which includes a
|
// New returns a context as a child of the given parent, which includes a
|
||||||
// randomized gomockctx ID value set, which makes it a gomockctx context. This
|
// randomized gomockctx ID value set, which makes it a gomockctx context. This
|
||||||
// can then be used with Is to get a gomock Matcher which returns true for the
|
// can then be used with Eq to get a gomock Matcher which returns true for the
|
||||||
// context from New, or any child contexts of it.
|
// context from New, or any child contexts of it.
|
||||||
//
|
//
|
||||||
// If crypto/rand returns an error, this will panic trying to generate the
|
// If crypto/rand returns an error, this will panic trying to generate the
|
||||||
|
|||||||
Reference in New Issue
Block a user