checks.go
func GoroutineCountCheck(threshold int) Check {
	return func() error {
		count := runtime.NumGoroutine()
		if count > threshold {
			return fmt.Errorf("too many goroutines (%d > %d)", count, threshold)
		}
		return nil
	}
}
func GoroutineCountCheck(threshold int) Check {
	return func() error {
		count := runtime.NumGoroutine()
		if count > threshold {
			return fmt.Errorf("too many goroutines (%d > %d)", count, threshold)
		}
		return nil
	}
}
// GoroutineCountCheck returns a Check that fails if too many goroutines are
// running (which could indicate a resource leak).