Merge pull request #286 from thaJeztah/undeprecate_ErrorType
assert, assert/cmp: un-deprecate assert.ErrorType for now
diff --git a/assert/assert.go b/assert/assert.go
index c418bd0..ae62cef 100644
--- a/assert/assert.go
+++ b/assert/assert.go
@@ -284,8 +284,6 @@
// must be called from the goroutine running the test function, not from other
// goroutines created during the test. Use [Check] with [cmp.ErrorType] from other
// goroutines.
-//
-// Deprecated: Use [ErrorIs]
func ErrorType(t TestingT, err error, expected interface{}, msgAndArgs ...interface{}) {
if ht, ok := t.(helperT); ok {
ht.Helper()
diff --git a/assert/cmp/compare.go b/assert/cmp/compare.go
index 3ced3de..a7507e6 100644
--- a/assert/cmp/compare.go
+++ b/assert/cmp/compare.go
@@ -286,6 +286,7 @@
}
// ErrorType succeeds if err is not nil and is of the expected type.
+// New code should use [ErrorIs] instead.
//
// Expected can be one of:
//
@@ -306,8 +307,6 @@
// reflect.Type
//
// Fails if err does not implement the [reflect.Type].
-//
-// Deprecated: Use [ErrorIs]
func ErrorType(err error, expected interface{}) Comparison {
return func() Result {
switch expectedType := expected.(type) {