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:
parent
5bbca40032
commit
b1c75f04d8
1 changed files with 1 additions and 124 deletions
13
mcp/cmd.go
13
mcp/cmd.go
|
|
@ -27,19 +27,6 @@ type CommandTransport struct {
|
|||
TerminateDuration time.Duration
|
||||
}
|
||||
|
||||
// NewCommandTransport returns a [CommandTransport] that runs the given command
|
||||
// and communicates with it over stdin/stdout.
|
||||
//
|
||||
// The resulting transport takes ownership of the command, starting it during
|
||||
// [CommandTransport.Connect], and stopping it when the connection is closed.
|
||||
//
|
||||
// Deprecated: use a CommandTransport literal.
|
||||
//
|
||||
//go:fix inline
|
||||
func NewCommandTransport(cmd *exec.Cmd) *CommandTransport {
|
||||
return &CommandTransport{Command: cmd}
|
||||
}
|
||||
|
||||
// Connect starts the command, and connects to it over stdin/stdout.
|
||||
func (t *CommandTransport) Connect(ctx context.Context) (Connection, error) {
|
||||
stdout, err := t.Command.StdoutPipe()
|
||||
|
|
|
|||
Loading…
Reference in a new issue