ioutil.go at [c62581c2a6]

File src/0dev.org/ioutil/ioutil.go artifact 404db9969d part of check-in c62581c2a6


// Package ioutil contains various constructs for io operations
package ioutil

// An function alias type that implements io.Writer
type WriterFunc func([]byte) (int, error)

// Delegates the call to the WriterFunc while implementing io.Writer
func (w WriterFunc) Write(b []byte) (int, error) {
	return w(b)
}

// An function alias type that implements io.Reader
type ReaderFunc func([]byte) (int, error)

// Delegates the call to the WriterFunc while implementing io.Reader
func (r ReaderFunc) Read(b []byte) (int, error) {
	return r(b)
}