Files
mattermost/plugin/rpcplugin/io.go
Chris f80d50adbd PLT-7407: Back-end plugin mechanism (#7177)
* begin backend plugin wip

* flesh out rpcplugin. everything done except for minor supervisor stubs

* done with basic plugin infrastructure

* simplify tests

* remove unused test lines
2017-08-16 17:23:38 -05:00

24 lines
338 B
Go

package rpcplugin
import (
"io"
)
type rwc struct {
io.ReadCloser
io.WriteCloser
}
func (rwc *rwc) Close() error {
rerr := rwc.ReadCloser.Close()
werr := rwc.WriteCloser.Close()
if rerr != nil {
return rerr
}
return werr
}
func NewReadWriteCloser(r io.ReadCloser, w io.WriteCloser) io.ReadWriteCloser {
return &rwc{r, w}
}