Skip to content

Commit 2d54a39

Browse files
committed
refactor: update IOTransport fields to public
1 parent 02194a6 commit 2d54a39

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

mcp/transport.go

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,13 @@ func NewStdioTransport() *StdioTransport {
106106
// An IOTransport is a [Transport] that communicates over separate
107107
// io.ReadCloser and io.WriteCloser using newline-delimited JSON.
108108
type IOTransport struct {
109-
reader io.ReadCloser
110-
writer io.WriteCloser
109+
Reader io.ReadCloser
110+
Writer io.WriteCloser
111111
}
112112

113113
// Connect implements the [Transport] interface.
114114
func (t *IOTransport) Connect(context.Context) (Connection, error) {
115-
return newIOConn(rwc{t.reader, t.writer}), nil
116-
}
117-
118-
// NewIOTransport constructs a transport that communicates over
119-
// io.ReadCloser and io.WriteCloser.
120-
//
121-
//go:fix inline
122-
func NewIOTransport(reader io.ReadCloser, writer io.WriteCloser) *IOTransport {
123-
return &IOTransport{
124-
reader: reader,
125-
writer: writer,
126-
}
115+
return newIOConn(rwc{t.Reader, t.Writer}), nil
127116
}
128117

129118
// An InMemoryTransport is a [Transport] that communicates over an in-memory

0 commit comments

Comments
 (0)