Update golangci-lint

This commit is contained in:
9seconds
2022-08-08 15:54:38 +03:00
parent 6a19ded78e
commit 36dad5a2f6
70 changed files with 227 additions and 214 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ func captureOutput(filefp **os.File, callback func()) string {
closeChan := make(chan bool)
go func() {
io.Copy(buf, reader) // nolint: errcheck
io.Copy(buf, reader) //nolint: errcheck
close(closeChan)
}()
+3 -3
View File
@@ -15,17 +15,17 @@ type MtglibNetworkMock struct {
func (m *MtglibNetworkMock) Dial(network, address string) (essentials.Conn, error) {
args := m.Called(network, address)
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck, forcetypeassert
return args.Get(0).(essentials.Conn), args.Error(1) //nolint: wrapcheck, forcetypeassert
}
func (m *MtglibNetworkMock) DialContext(ctx context.Context, network, address string) (essentials.Conn, error) {
args := m.Called(ctx, network, address)
return args.Get(0).(essentials.Conn), args.Error(1) // nolint: wrapcheck, forcetypeassert
return args.Get(0).(essentials.Conn), args.Error(1) //nolint: wrapcheck, forcetypeassert
}
func (m *MtglibNetworkMock) MakeHTTPClient(dialFunc func(ctx context.Context,
network, address string) (essentials.Conn, error),
) *http.Client {
return m.Called(dialFunc).Get(0).(*http.Client) // nolint: forcetypeassert
return m.Called(dialFunc).Get(0).(*http.Client) //nolint: forcetypeassert
}
+8 -8
View File
@@ -24,33 +24,33 @@ func (n *EssentialsConnMock) Write(b []byte) (int, error) {
}
func (n *EssentialsConnMock) Close() error {
return n.Called().Error(0) // nolint: wrapcheck
return n.Called().Error(0) //nolint: wrapcheck
}
func (n *EssentialsConnMock) CloseRead() error {
return n.Called().Error(0) // nolint: wrapcheck
return n.Called().Error(0) //nolint: wrapcheck
}
func (n *EssentialsConnMock) CloseWrite() error {
return n.Called().Error(0) // nolint: wrapcheck
return n.Called().Error(0) //nolint: wrapcheck
}
func (n *EssentialsConnMock) LocalAddr() net.Addr {
return n.Called().Get(0).(net.Addr) // nolint: forcetypeassert
return n.Called().Get(0).(net.Addr) //nolint: forcetypeassert
}
func (n *EssentialsConnMock) RemoteAddr() net.Addr {
return n.Called().Get(0).(net.Addr) // nolint: forcetypeassert
return n.Called().Get(0).(net.Addr) //nolint: forcetypeassert
}
func (n *EssentialsConnMock) SetDeadline(t time.Time) error {
return n.Called(t).Error(0) // nolint: wrapcheck
return n.Called(t).Error(0) //nolint: wrapcheck
}
func (n *EssentialsConnMock) SetReadDeadline(t time.Time) error {
return n.Called(t).Error(0) // nolint: wrapcheck
return n.Called(t).Error(0) //nolint: wrapcheck
}
func (n *EssentialsConnMock) SetWriteDeadline(t time.Time) error {
return n.Called(t).Error(0) // nolint: wrapcheck
return n.Called(t).Error(0) //nolint: wrapcheck
}