From cab2acc70fc066111d648519a52920dc1fe42a90 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Wed, 18 Sep 2019 11:50:27 +0100 Subject: [PATCH] Do not get argument again unnecessarily in Arguments.Error() --- mock/mock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mock/mock.go b/mock/mock.go index 213bde2ea..eca55f6a1 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -1092,7 +1092,7 @@ func (args Arguments) Error(index int) error { return nil } if s, ok = obj.(error); !ok { - panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, args.Get(index))) + panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, obj)) } return s }