{"modulePath":"github.com/Coding/drone","version":"v0.4.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package internal\n\n## Functions\n\n```go\nfunc NewStdWriter(w io.Writer, t StdType) io.Writer\n```\nNewStdWriter instantiates a new Writer. Everything written to it will be encapsulated using a custom format, and written to the underlying \\`w\\` stream. This allows multiple write streams (e.g. stdout and stderr) to be muxed into a single connection. \\`t\\` indicates the id of the stream to encapsulate. It can be stdcopy.Stdin, stdcopy.Stdout, stdcopy.Stderr.\n\n```go\nfunc StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, err error)\n```\nStdCopy is a modified version of io.Copy.\n\nStdCopy will demultiplex \\`src\\`, assuming that it contains two streams, previously multiplexed together using a StdWriter instance. As it reads from \\`src\\`, StdCopy will write to \\`dstout\\` and \\`dsterr\\`.\n\nStdCopy will read until it hits EOF on \\`src\\`. It will then return a nil error. In other words: if \\`err\\` is non nil, it indicates a real underlying error.\n\n\\`written\\` will hold the total number of bytes written to \\`dstout\\` and \\`dsterr\\`.\n\n## Types\n\n```go\ntype StdType byte\n```\nStdType is the type of standard stream a writer can multiplex to.\n\n```go\nconst (\n\t// Stdin represents standard input stream type.\n\tStdin StdType = iota\n\t// Stdout represents standard output stream type.\n\tStdout\n\t// Stderr represents standard error steam type.\n\tStderr\n)\n```\n\n","path":"github.com/Coding/drone/engine/runner/docker/internal","name":"internal","synopsis":"","isRedistributable":true}
