stream.go
func Sequence(filters ...Filter) Filter {
	if len(filters) == 1 {
		return filters[0]
	}
	return FilterFunc(func(arg Arg) error {
		e := &filterErrors{}
		in := arg.In
		for _, f := range filters {
			c := make(chan string, channelBuffer)
			go runFilter(f, Arg{In: in, Out: c}, e)
			in = c
		}
		for s := range in {
			arg.Out <- s
		}
		return e.getError()
	})
}
func Sequence(filters ...Filter) Filter {
	if len(filters) == 1 {
		return filters[0]
	}
	return FilterFunc(func(arg Arg) error {
		e := &filterErrors{}
		in := arg.In
		for _, f := range filters {
			c := make(chan string, channelBuffer)
			go runFilter(f, Arg{In: in, Out: c}, e)
			in = c
		}
		for s := range in {
			arg.Out <- s
		}
		return e.getError()
	})
}
func Sequence ( filters ... Filter ) Filter { if len ( filters ) == 1 { return filters [ 0 ] } return FilterFunc ( func ( arg Arg ) error { e := & filterErrors { } in := arg . In for _ , f := range filters { c := make ( chan string , channelBuffer ) go runFilter ( f , Arg { In : in , Out : c } , e ) in = c } for s := range in { arg . Out <- s } return e . getError ( ) } ) }
// Sequence returns a filter that is the concatenation of all filter arguments.
// The output of a filter is fed as input to the next filter.
Sequence returns a filter that is the concatenation of all filter arguments . The output of a filter is fed as input to the next filter .