diff --git a/client/container_exec.go b/client/container_exec.go index db1d68be95..eb732fd027 100644 --- a/client/container_exec.go +++ b/client/container_exec.go @@ -56,24 +56,21 @@ func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config // ContainerExecAttach attaches a connection to an exec process in the server. // -// It returns a types.HijackedConnection with the hijacked connection +// It returns a [types.HijackedResponse] with the hijacked connection // and the a reader to get output. It's up to the called to close -// the hijacked connection by calling types.HijackedResponse.Close. +// the hijacked connection by calling [types.HijackedResponse.Close]. // -// The stream format on the response will be in one of two formats: +// The stream format on the response uses one of two formats: // -// If the container is using a TTY, there is only a single stream (stdout), and -// data is copied directly from the container output stream, no extra -// multiplexing or headers. +// - If the container is using a TTY, there is only a single stream (stdout), and +// data is copied directly from the container output stream, no extra +// multiplexing or headers. +// - If the container is *not* using a TTY, streams for stdout and stderr are +// multiplexed. // -// If the container is *not* using a TTY, streams for stdout and stderr are -// multiplexed. -// -// You can use github.com/docker/docker/pkg/stdcopy.StdCopy to demultiplex this +// You can use [github.com/docker/docker/pkg/stdcopy.StdCopy] to demultiplex this +// stream. Refer to [Client.ContainerAttach] for details about the multiplexed // stream. -// -// For more technical informations about the multiplexed stream, check the -// [ContainerAttach] documentation. func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config container.ExecAttachOptions) (types.HijackedResponse, error) { if versions.LessThan(cli.ClientVersion(), "1.42") { config.ConsoleSize = nil