1
0
Эх сурвалжийг харах

Fix Linting Issues

Signed-off-by: AhmedGrati <[email protected]>
AhmedGrati 2 жил өмнө
parent
commit
3a21e1e319

+ 1 - 1
cmd/formatter/colors.go

@@ -99,6 +99,7 @@ func cleanInfiniteGoroutine() {
 }
 
 func init() {
+	defer cleanInfiniteGoroutine()
 	colors := map[string]colorFunc{}
 	for i, name := range names {
 		colors[name] = makeColorFunc(strconv.Itoa(30 + i))
@@ -131,5 +132,4 @@ func init() {
 		}
 	}()
 
-	defer cleanInfiniteGoroutine()
 }

+ 1 - 1
cmd/formatter/formatter_test.go

@@ -75,5 +75,5 @@ func TestPrint(t *testing.T) {
 
 // Test the absence of unexpected goroutines.
 func TestColorsGoroutinesLeak(t *testing.T) {
-	defer goleak.VerifyNone(t)
+	goleak.VerifyNone(t)
 }