3 Commits

4 changed files with 8 additions and 16 deletions

View File

@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.1.0](https://github.com/romdo/gomockctx/compare/v0.0.1...v0.1.0) (2022-03-21)
### ⚠ BREAKING CHANGES
* remove deprecated Is() function, use Eq() instead ([af2f565](https://github.com/romdo/gomockctx/commit/af2f5654659b83d66ccb7d03108ede615bdc57e5))
### 0.0.1 (2022-03-21)

View File

@@ -11,6 +11,7 @@
<p align="center">
<a href="https://pkg.go.dev/github.com/romdo/gomockctx"><img src="https://img.shields.io/badge/%E2%80%8B-reference-387b97.svg?logo=go&logoColor=white" alt="Go Reference"></a>
<a href="https://github.com//romdo/gomockctx/releases"><img src="https://img.shields.io/github/v/tag/romdo/gomockctx?label=release" alt="GitHub tag (latest SemVer)"></a>
<a href="https://github.com/romdo/gomockctx/actions"><img src="https://img.shields.io/github/workflow/status/romdo/gomockctx/CI.svg?logo=github" alt="Actions Status"></a>
<a href="https://codeclimate.com/github/romdo/gomockctx"><img src="https://img.shields.io/codeclimate/coverage/romdo/gomockctx.svg?logo=code%20climate" alt="Coverage"></a>
<a href="https://github.com/romdo/gomockctx/issues"><img src="https://img.shields.io/github/issues-raw/romdo/gomockctx.svg?style=flat&logo=github&logoColor=white" alt="GitHub issues"></a>

View File

@@ -59,18 +59,6 @@ func Eq(ctx context.Context) gomock.Matcher {
return WithValue(ctxKey, getValue(ctx))
}
// Is accepts a context with a gomockctx ID value (as returned from New), and
// returns a gomock.Matcher which returns true for the given context, and any
// child contexts of it.
//
// If ctx was not returned from New, the resulting matcher will ALWAYS return
// false.
//
// Deprecated: Renamed to Eq().
func Is(ctx context.Context) gomock.Matcher {
return Eq(ctx)
}
// ID returns the gomockctx ID value in the given context, or a empty string if
// the context does not have a gomockctx ID value.
func ID(ctx context.Context) string {

View File

@@ -109,10 +109,6 @@ func TestEq(t *testing.T) {
}
}
func TestIs(t *testing.T) {
TestEq(t)
}
func TestID(t *testing.T) {
tests := []struct {
name string