mcp: remove deprecated transport constructors

In #272, we made transports open structs and deprecated their
constructors. However, we left the constructors in place to allow go:fix
directives to facilitate migration.

Now let's remove the constructors before cutting the release.

Fixes #305
This commit is contained in:
Rob Findley 2025-09-10 13:36:19 +00:00 • committed by Robert Findley
commit b1c75f04d8

View file

@ -93,16 +93,6 @@ func (*StdioTransport) Connect(context.Context) (Connection, error) {
return newIOConn(rwc{os.Stdin, os.Stdout}), nil
}
// NewStdioTransport constructs a transport that communicates over
// stdin/stdout.
//
// Deprecated: use a StdioTransport literal.
//
//go:fix inline
func NewStdioTransport() *StdioTransport {
return &StdioTransport{}
}
// An InMemoryTransport is a [Transport] that communicates over an in-memory
// network connection, using newline-delimited JSON.
type InMemoryTransport struct {
@ -215,16 +205,6 @@ type LoggingTransport struct {
Writer io.Writer
}
// NewLoggingTransport creates a new LoggingTransport that delegates to the
// provided transport, writing RPC logs to the provided io.Writer.
//
// Deprecated: use a LoggingTransport literal.
//
//go:fix inline
func NewLoggingTransport(delegate Transport, w io.Writer) *LoggingTransport {
return &LoggingTransport{Transport: delegate, Writer: w}
}
// Connect connects the underlying transport, returning a [Connection] that writes
// logs to the configured destination.
func (t *LoggingTransport) Connect(ctx context.Context) (Connection, error) {