@@ -26,7 +26,7 @@ import (
2626// assertExpectedAndActual is a helper function to allow the step function to call
2727// assertion functions where you want to compare an expected and an actual value.
2828func assertExpectedAndActual (a expectedAndActualAssertion ,
29- expected , actual interface {} , msgAndArgs ... interface {} ,
29+ expected , actual any , msgAndArgs ... any ,
3030) error {
3131 var t asserter
3232
@@ -36,12 +36,12 @@ func assertExpectedAndActual(a expectedAndActualAssertion,
3636}
3737
3838type expectedAndActualAssertion func (t assert.TestingT ,
39- expected , actual interface {} , msgAndArgs ... interface {} ) bool
39+ expected , actual any , msgAndArgs ... any ) bool
4040
4141// assertActual is a helper function to allow the step function to call
4242// assertion functions where you want to compare an actual value to a
4343// predefined state like nil, empty or true/false.
44- func assertActual (a actualAssertion , actual interface {} ) error {
44+ func assertActual (a actualAssertion , actual any ) error {
4545 var t asserter
4646
4747 a (& t , actual )
@@ -52,8 +52,8 @@ func assertActual(a actualAssertion, actual interface{}) error {
5252// assertExpectedLenAndActual is a helper function to allow the step function to call
5353// assertion functions where you want to compare an actual value to a
5454// has specific length.
55- func assertExpectedLenAndActual (a func (t assert.TestingT , object interface {} ,
56- length int , msgAndArgs ... interface {} ) bool , actual interface {} , length int , msgAndArgs ... interface {} ,
55+ func assertExpectedLenAndActual (a func (t assert.TestingT , object any ,
56+ length int , msgAndArgs ... any ) bool , actual any , length int , msgAndArgs ... any ,
5757) error {
5858 var t asserter
5959
@@ -62,7 +62,7 @@ func assertExpectedLenAndActual(a func(t assert.TestingT, object interface{},
6262 return t .err
6363}
6464
65- type actualAssertion func (t assert.TestingT , actual interface {} , msgAndArgs ... interface {} ) bool
65+ type actualAssertion func (t assert.TestingT , actual any , msgAndArgs ... any ) bool
6666
6767// asserter is used to be able to retrieve the error reported by the called assertion.
6868type asserter struct {
@@ -72,6 +72,6 @@ type asserter struct {
7272// Errorf is used by the called assertion to report an error.
7373//
7474//nolint:err113
75- func (a * asserter ) Errorf (format string , args ... interface {} ) {
75+ func (a * asserter ) Errorf (format string , args ... any ) {
7676 a .err = fmt .Errorf (format , args ... )
7777}
0 commit comments