Exemple #1
0
func checkData(chkr *checker.Checker) []error {
	return collectErrors(
		func(errCh chan<- error, done <-chan struct{}) {
			chkr.ReadData(nil, errCh, done)
		},
	)
}
Exemple #2
0
func assertNoUnreferencedPacks(t *testing.T, chkr *checker.Checker) {
	done := make(chan struct{})
	defer close(done)

	errChan := make(chan error)
	go chkr.Packs(errChan, done)

	for err := range errChan {
		OK(t, err)
	}
}
Exemple #3
0
func checkStruct(chkr *checker.Checker) (errs []error) {
	done := make(chan struct{})
	defer close(done)

	errChan := make(chan error)

	go chkr.Structure(errChan, done)

	for err := range errChan {
		errs = append(errs, err)
	}

	return errs
}