Add some stdcopy_test (coverage)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
b140321e2e
commit
3cc15b53e7
2 changed files with 65 additions and 4 deletions
|
@ -54,10 +54,6 @@ func (w *StdWriter) Write(buf []byte) (n int, err error) {
|
|||
// `t` indicates the id of the stream to encapsulate.
|
||||
// It can be stdcopy.Stdin, stdcopy.Stdout, stdcopy.Stderr.
|
||||
func NewStdWriter(w io.Writer, t StdType) *StdWriter {
|
||||
if len(t) != StdWriterPrefixLen {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &StdWriter{
|
||||
Writer: w,
|
||||
prefix: t,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue