{"modulePath":"github.com/cspotcode/docker-cli","version":"v20.10.0-rc1+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package commandconn\n\nPackage commandconn provides a net.Conn implementation that can be used for proxying (or emulating) stream via a custom command.\n\nFor example, to provide an http.Client that can connect to a Docker daemon running in a Docker container (\"DIND\"):\n\n\thttpClient := \u0026http.Client{\n\t\tTransport: \u0026http.Transport{\n\t\t\tDialContext: func(ctx context.Context, _network, _addr string) (net.Conn, error) {\n\t\t\t\treturn commandconn.New(ctx, \"docker\", \"exec\", \"-it\", containerID, \"docker\", \"system\", \"dial-stdio\")\n\t\t\t},\n\t\t},\n\t}\n\n## Functions\n\n```go\nfunc New(ctx context.Context, cmd string, args ...string) (net.Conn, error)\n```\nNew returns net.Conn\n\n","path":"github.com/cspotcode/docker-cli/cli/connhelper/commandconn","name":"commandconn","synopsis":"Package commandconn provides a net.Conn implementation that can be used for proxying (or emulating) stream via a custom command.","isRedistributable":true}
