From 3a21e1e31903304e4d11a717028bec21ba346a41 Mon Sep 17 00:00:00 2001 From: AhmedGrati Date: Mon, 23 Jan 2023 10:50:56 +0100 Subject: [PATCH] Fix Linting Issues Signed-off-by: AhmedGrati --- cmd/formatter/colors.go | 2 +- cmd/formatter/formatter_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/formatter/colors.go b/cmd/formatter/colors.go index d7b85138..5dc33614 100644 --- a/cmd/formatter/colors.go +++ b/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() } diff --git a/cmd/formatter/formatter_test.go b/cmd/formatter/formatter_test.go index 677a0658..c672ade8 100644 --- a/cmd/formatter/formatter_test.go +++ b/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) }