Esempio n. 1
0
func join(arr []fooType) string {
	var agg multiType
	var none noneType
	return common.Join(arr, agg, none).(fooType).ToString()
}
Esempio n. 2
0
// Combine combines multiple R instances together and returns them
// as a single one.
func Combine(rs ...R) R {
	var aggregate combinedRecurring
	return common.Join(rs, aggregate, nilRecurring{}).(R)
}
Esempio n. 3
0
// SeriesTasks returns a task that performas all the passed in tasks in
// series. If one of the tasks reports an error, the others following it
// don't get executed.
func SeriesTasks(tasks ...Task) Task {
	var aggregate seriesTasks
	return common.Join(tasks, aggregate, nilTask{}).(Task)
}
Esempio n. 4
0
// ParallelTasks returns a task that performs all the passed in tasks in
// parallel.
func ParallelTasks(tasks ...Task) Task {
	var aggregate parallelTasks
	return common.Join(tasks, aggregate, nilTask{}).(Task)
}
Esempio n. 5
0
// All returns a Filterer that returns nil if all of the
// fs return nil. Otherwise it returns the first error encountered.
func All(fs ...Filterer) Filterer {
	var aggregate andFilterer
	return common.Join(fs, aggregate, trueF).(Filterer)
}
Esempio n. 6
0
// Any returns a Filterer that returns Skipped if all of the fs return
// Skipped. Otherwise it returns nil or the first error not equal to Skipped.
func Any(fs ...Filterer) Filterer {
	var aggregate orFilterer
	return common.Join(fs, aggregate, falseF).(Filterer)
}