mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:54:02 +03:00
Update golangci-lint
This commit is contained in:
@@ -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)
|
||||
}()
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user