// newFilterWriteCloser converts a filter list into a WriteCloser that
// can be used by a blockWriter.

newFilterWriteCloser converts a filter list into a WriteCloser that
can be used by a blockWriter.
// newFilterWriteCloser converts a filter list into a WriteCloser that // can be used by a blockWriter .
func (c *WriterConfig) newFilterWriteCloser(w io.Writer, f []filter) (fw io.WriteCloser, err error) {
	if err = verifyFilters(f); err != nil {
		return nil, err
	}
	fw = nopWriteCloser(w)
	for i := len(f) - 1; i >= 0; i-- {
		fw, err = f[i].writeCloser(fw, c)
		if err != nil {
			return nil, err
		}
	}
	return fw, nil
}
func ( c * WriterConfig ) newFilterWriteCloser ( w io . Writer , f [ ] filter ) ( fw io . WriteCloser , err error ) { if err = verifyFilters ( f ) ; err != nil { return nil , err } fw = nopWriteCloser ( w ) for i := len ( f ) - 1 ; i >= 0 ; i -- { fw , err = f [ i ] . writeCloser ( fw , c ) if err != nil { return nil , err } } return fw , nil }
newFilterWriteCloser converts a filter list into a WriteCloser that
can be used by a blockWriter.
newFilterWriteCloser converts a filter list into a WriteCloser that can be used by a blockWriter .