Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 6e23395

Browse files
author
Nate Brennand
committed
silence golint errors in gomock/call.go
1 parent 2ee3d4d commit 6e23395

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gomock/call.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func (c *Call) Do(f interface{}) *Call {
7878
return c
7979
}
8080

81+
// Return declares the values to be returned by the mocked function call.
8182
func (c *Call) Return(rets ...interface{}) *Call {
8283
mt := c.methodType
8384
if len(rets) != mt.NumOut() {
@@ -112,6 +113,7 @@ func (c *Call) Return(rets ...interface{}) *Call {
112113
return c
113114
}
114115

116+
// Times declares the exact number of times a function call is expected to be executed.
115117
func (c *Call) Times(n int) *Call {
116118
c.minCalls, c.maxCalls = n, n
117119
return c
@@ -146,7 +148,7 @@ func (c *Call) SetArg(n int, value interface{}) *Call {
146148
case reflect.Slice:
147149
// nothing to do
148150
default:
149-
c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice type %v",
151+
c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice type %v [%s]",
150152
n, at, c.origin)
151153
}
152154
c.setArgs[n] = reflect.ValueOf(value)
@@ -204,7 +206,7 @@ func (c *Call) matches(args []interface{}) error {
204206
}
205207
for i, m := range c.args {
206208
if !m.Matches(args[i]) {
207-
return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v\n",
209+
return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v",
208210
c.origin, strconv.Itoa(i), args[i], m)
209211
}
210212
}

0 commit comments

Comments
 (0)