1 // Copyright 2023 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 //go:build go1.21 6 7 package countertest 8 9 import "testing" 10 11 func init() { 12 // Extra safety check for go1.21+. 13 if !testing.Testing() { 14 panic("use of this package is disallowed in non-testing code") 15 } 16 } 17