mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 12:34:01 +03:00
Formatting by gofumpt
This commit is contained in:
@@ -129,7 +129,7 @@ func (a *Access) getIP(ntw mtglib.Network, protocol string) net.IP {
|
||||
|
||||
defer func() {
|
||||
io.Copy(io.Discard, resp.Body) //nolint: errcheck
|
||||
resp.Body.Close() //nolint: errcheck
|
||||
resp.Body.Close() //nolint: errcheck
|
||||
}()
|
||||
|
||||
data, err := io.ReadAll(resp.Body)
|
||||
|
||||
@@ -23,7 +23,7 @@ func (h httpFile) Open(ctx context.Context) (io.ReadCloser, error) {
|
||||
if err != nil {
|
||||
if response != nil {
|
||||
io.Copy(io.Discard, response.Body) //nolint: errcheck
|
||||
response.Body.Close() //nolint: errcheck
|
||||
response.Body.Close() //nolint: errcheck
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("cannot get url %s: %w", h.url, err)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.Conn) {
|
||||
defer telegramConn.Close() //nolint: errcheck
|
||||
defer clientConn.Close() //nolint: errcheck
|
||||
defer clientConn.Close() //nolint: errcheck
|
||||
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
@@ -18,7 +18,7 @@ func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
telegramConn.Close() //nolint: errcheck
|
||||
clientConn.Close() //nolint: errcheck
|
||||
clientConn.Close() //nolint: errcheck
|
||||
}()
|
||||
|
||||
closeChan := make(chan struct{})
|
||||
|
||||
@@ -100,7 +100,7 @@ func (suite *StatsdTestSuite) SetupTest() {
|
||||
|
||||
func (suite *StatsdTestSuite) TearDownTest() {
|
||||
suite.statsd.Shutdown()
|
||||
suite.factory.Close() //nolint: errcheck
|
||||
suite.factory.Close() //nolint: errcheck
|
||||
suite.statsdServer.Close() //nolint: errcheck
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user