Skip to content

Commit 05f87c0

Browse files
committed
more similar
1 parent ea7129e commit 05f87c0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

mock/mock.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -1227,16 +1227,14 @@ func assertOpts(expected, actual interface{}) (expectedFmt, actualFmt string) {
12271227
}
12281228

12291229
for i := 0; i < expectedOpts.Len(); i++ {
1230+
expectedOpt := expectedOpts.Index(i).Interface()
1231+
actualOpt := actualOpts.Index(i).Interface()
1232+
12301233
if !isFuncSame(expectedFuncs[i], actualFuncs[i]) {
12311234
expectedFmt = expectedNames[i]
12321235
actualFmt = actualNames[i]
12331236
return
12341237
}
1235-
}
1236-
1237-
for i := 0; i < expectedOpts.Len(); i++ {
1238-
expectedOpt := expectedOpts.Index(i).Interface()
1239-
actualOpt := actualOpts.Index(i).Interface()
12401238

12411239
ot := reflect.TypeOf(expectedOpt)
12421240
var expectedValues []reflect.Value

0 commit comments

Comments
 (0)