Fix Typo in stdcopy.go
Signed-off-by: Yu Chengxia <yuchengxia@huawei.com>
This commit is contained in:
parent
6515b2edcb
commit
f5527956fb
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ type StdWriter struct {
|
||||||
func (w *StdWriter) Write(buf []byte) (n int, err error) {
|
func (w *StdWriter) Write(buf []byte) (n int, err error) {
|
||||||
var n1, n2 int
|
var n1, n2 int
|
||||||
if w == nil || w.Writer == nil {
|
if w == nil || w.Writer == nil {
|
||||||
return 0, errors.New("Writer not instanciated")
|
return 0, errors.New("Writer not instantiated")
|
||||||
}
|
}
|
||||||
binary.BigEndian.PutUint32(w.prefix[4:], uint32(len(buf)))
|
binary.BigEndian.PutUint32(w.prefix[4:], uint32(len(buf)))
|
||||||
n1, err = w.Writer.Write(w.prefix[:])
|
n1, err = w.Writer.Write(w.prefix[:])
|
||||||
|
@ -47,7 +47,7 @@ func (w *StdWriter) Write(buf []byte) (n int, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewStdWriter instanciates a new Writer.
|
// NewStdWriter instantiates a new Writer.
|
||||||
// Everything written to it will be encapsulated using a custom format,
|
// Everything written to it will be encapsulated using a custom format,
|
||||||
// and written to the underlying `w` stream.
|
// and written to the underlying `w` stream.
|
||||||
// This allows multiple write streams (e.g. stdout and stderr) to be muxed into a single connection.
|
// This allows multiple write streams (e.g. stdout and stderr) to be muxed into a single connection.
|
||||||
|
|
Loading…
Reference in a new issue