Skip to content

Commit 361703e

Browse files
committed
lint
1 parent 1bddab6 commit 361703e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

characterize_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package nject
22

33
import (
4-
"fmt"
54
"net/http"
65
"reflect"
76
"strings"
@@ -391,12 +390,12 @@ func TestCharacterize(t *testing.T) {
391390
}
392391
for ft, ev := range test.flows {
393392
t.Logf("flow %s: %s", flowType(ft), een(ev))
394-
assert.EqualValues(t, een(ev), een(fm.flows[ft]), fmt.Sprintf("%s flow: %s", flowType(ft), test.name))
393+
assert.EqualValuesf(t, een(ev), een(fm.flows[ft]), "%s flow: %s", flowType(ft), test.name)
395394
}
396395
for ft, gv := range fm.flows {
397396
if test.flows[ft] == nil {
398397
t.Logf("flow %s: %s", flowType(ft), een(gv))
399-
assert.EqualValues(t, een(test.flows[ft]), een(gv), fmt.Sprintf("%s flow %s", flowType(ft), test.name))
398+
assert.EqualValuesf(t, een(test.flows[ft]), een(gv), "%s flow %s", flowType(ft), test.name)
400399
}
401400
}
402401
}

filler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func MakeStructBuilder(model interface{}, optArgs ...FillerFuncArg) (Provider, e
291291
// PostActionByType
292292
fieldTypes := []reflect.Type{field.Type}
293293
if f.pointer {
294-
fieldTypes = []reflect.Type{reflect.PtrTo(field.Type), field.Type}
294+
fieldTypes = []reflect.Type{reflect.PointerTo(field.Type), field.Type}
295295
}
296296
for _, typ := range fieldTypes {
297297
for _, fun := range byType[getTypeCode(typ)] {
@@ -358,7 +358,7 @@ func (f *filler) NumIn() int {
358358

359359
func (f *filler) Out(i int) reflect.Type {
360360
if f.pointer {
361-
return reflect.PtrTo(f.typ)
361+
return reflect.PointerTo(f.typ)
362362
}
363363
return f.typ
364364
}
@@ -482,7 +482,7 @@ func addFieldFiller(
482482
continue
483483
}
484484
check(field.Type, false)
485-
check(reflect.PtrTo(field.Type), true)
485+
check(reflect.PointerTo(field.Type), true)
486486
}
487487
if option.matchToInterface && countEmptyInterfaces != 1 {
488488
return nil, false, fmt.Errorf("%s need exactly one interface{} parameters in function", context)

0 commit comments

Comments
 (0)