Procházet zdrojové kódy

Formatting by gofumpt

tags/v2.1.9^2
9seconds před 2 měsíci
rodič
revize
074c4017f5

+ 1
- 1
internal/cli/access.go Zobrazit soubor

@@ -129,7 +129,7 @@ func (a *Access) getIP(ntw mtglib.Network, protocol string) net.IP {
129 129
 
130 130
 	defer func() {
131 131
 		io.Copy(io.Discard, resp.Body) //nolint: errcheck
132
-		resp.Body.Close() //nolint: errcheck
132
+		resp.Body.Close()              //nolint: errcheck
133 133
 	}()
134 134
 
135 135
 	data, err := io.ReadAll(resp.Body)

+ 1
- 1
ipblocklist/files/http.go Zobrazit soubor

@@ -23,7 +23,7 @@ func (h httpFile) Open(ctx context.Context) (io.ReadCloser, error) {
23 23
 	if err != nil {
24 24
 		if response != nil {
25 25
 			io.Copy(io.Discard, response.Body) //nolint: errcheck
26
-			response.Body.Close() //nolint: errcheck
26
+			response.Body.Close()              //nolint: errcheck
27 27
 		}
28 28
 
29 29
 		return nil, fmt.Errorf("cannot get url %s: %w", h.url, err)

+ 2
- 2
mtglib/internal/relay/relay.go Zobrazit soubor

@@ -10,7 +10,7 @@ import (
10 10
 
11 11
 func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.Conn) {
12 12
 	defer telegramConn.Close() //nolint: errcheck
13
-	defer clientConn.Close() //nolint: errcheck
13
+	defer clientConn.Close()   //nolint: errcheck
14 14
 
15 15
 	ctx, cancel := context.WithCancel(ctx)
16 16
 	defer cancel()
@@ -18,7 +18,7 @@ func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.
18 18
 	go func() {
19 19
 		<-ctx.Done()
20 20
 		telegramConn.Close() //nolint: errcheck
21
-		clientConn.Close() //nolint: errcheck
21
+		clientConn.Close()   //nolint: errcheck
22 22
 	}()
23 23
 
24 24
 	closeChan := make(chan struct{})

+ 1
- 1
stats/statsd_test.go Zobrazit soubor

@@ -100,7 +100,7 @@ func (suite *StatsdTestSuite) SetupTest() {
100 100
 
101 101
 func (suite *StatsdTestSuite) TearDownTest() {
102 102
 	suite.statsd.Shutdown()
103
-	suite.factory.Close() //nolint: errcheck
103
+	suite.factory.Close()      //nolint: errcheck
104 104
 	suite.statsdServer.Close() //nolint: errcheck
105 105
 }
106 106
 

Načítá se…
Zrušit
Uložit