Skip to content

Commit 7bd76b0

Browse files
committed
Do not get argument again unnecessarily in Arguments.Error()
1 parent 85f2b59 commit 7bd76b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎mock/mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ func (args Arguments) Error(index int) error {
807807
return nil
808808
}
809809
if s, ok = obj.(error); !ok {
810-
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, args.Get(index)))
810+
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, obj))
811811
}
812812
return s
813813
}

0 commit comments

Comments
 (0)