We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b670aef commit 3a21e1eCopy full SHA for 3a21e1e
cmd/formatter/colors.go
@@ -99,6 +99,7 @@ func cleanInfiniteGoroutine() {
99
}
100
101
func init() {
102
+ defer cleanInfiniteGoroutine()
103
colors := map[string]colorFunc{}
104
for i, name := range names {
105
colors[name] = makeColorFunc(strconv.Itoa(30 + i))
@@ -131,5 +132,4 @@ func init() {
131
132
133
}()
134
- defer cleanInfiniteGoroutine()
135
cmd/formatter/formatter_test.go
@@ -75,5 +75,5 @@ func TestPrint(t *testing.T) {
75
76
// Test the absence of unexpected goroutines.
77
func TestColorsGoroutinesLeak(t *testing.T) {
78
- defer goleak.VerifyNone(t)
+ goleak.VerifyNone(t)
79
0 commit comments