Source file src/cmd/vet/testdata/testinggoroutine/testinggoroutine.go
1 // Copyright 2026 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package testinggoroutine 6 7 import "testing" 8 9 func _(t *testing.T) { 10 go func() { 11 t.Fatal("fail") // ERROR `call to \(\*testing.T\).Fatal from a non-test goroutine` 12 }() 13 } 14