gotools/internal/fakenet/conn.go

// NewConn returns a net.Conn built on top of the supplied reader and writer.
// It decouples the read and write on the conn from the underlying stream
// to enable Close to abort ones that are in progress.
// It's primary use is to fake a network connection from stdin and stdout.
func NewConn(name string, in io.ReadCloser, out io.WriteCloser) net.Conn {}

type fakeConn

type fakeAddr

type connFeeder

type feedResult

func (c *fakeConn) Close() error {}

func (c *fakeConn) Read(b []byte) (n int, err error)   {}

func (c *fakeConn) Write(b []byte) (n int, err error)  {}

func (c *fakeConn) LocalAddr() net.Addr                {}

func (c *fakeConn) RemoteAddr() net.Addr               {}

func (c *fakeConn) SetDeadline(t time.Time) error      {}

func (c *fakeConn) SetReadDeadline(t time.Time) error  {}

func (c *fakeConn) SetWriteDeadline(t time.Time) error {}

func (a fakeAddr) Network() string                     {}

func (a fakeAddr) String() string                      {}

func newFeeder(source func([]byte) (int, error)) *connFeeder {}

func (f *connFeeder) close() {}

func (f *connFeeder) do(b []byte) (n int, err error) {}

func (f *connFeeder) run() {}