File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,14 +33,18 @@ func TestFuncName(t *testing.T) {
3333 assert .That (t , funcutil .FuncName ((* receiver ).ptrFnWithArgs )).Equal ("funcutil_test.(*receiver).ptrFnWithArgs" )
3434}
3535
36+ // nolint: unused
3637func fnNoArgs () {}
3738
39+ // nolint: unused
3840func fnWithArgs (i int ) {}
3941
4042type receiver struct {}
4143
44+ // nolint: unused
4245func (r * receiver ) ptrFnNoArgs () {}
4346
47+ // nolint: unused
4448func (r * receiver ) ptrFnWithArgs (i int ) {}
4549
4650func TestFileLine (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -45,15 +45,15 @@ func (m *MockTestingT) Helper() {}
4545func (m * MockTestingT ) Error (args ... any ) {
4646 m .buf .WriteString ("error# " )
4747 for _ , arg := range args {
48- m .buf . WriteString ( fmt .Sprint (arg ))
48+ _ , _ = fmt . Fprint ( & m .buf , fmt .Sprint (arg ))
4949 }
5050}
5151
5252// Fatal writes fatal messages to the internal buffer.
5353func (m * MockTestingT ) Fatal (args ... any ) {
5454 m .buf .WriteString ("fatal# " )
5555 for _ , arg := range args {
56- m .buf . WriteString ( fmt .Sprint (arg ))
56+ _ , _ = fmt . Fprint ( & m .buf , fmt .Sprint (arg ))
5757 }
5858}
5959
You can’t perform that action at this time.
0 commit comments