From 42e35ecff36fcb07e45c19f880af84f8532a3fac Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Thu, 23 Jan 2014 16:20:51 -0800 Subject: [PATCH] remove useless anonymous field mentions Docker-DCO-1.1-Signed-off-by: Victor Vieux (github: vieux) --- engine/streams.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/engine/streams.go b/engine/streams.go index 935334c261..4b1f172b49 100644 --- a/engine/streams.go +++ b/engine/streams.go @@ -23,8 +23,8 @@ func NewOutput() *Output { // Return true if something was written on this output func (o *Output) Used() bool { - o.Mutex.Lock() - defer o.Mutex.Unlock() + o.Lock() + defer o.Unlock() return o.used } @@ -32,8 +32,8 @@ func (o *Output) Used() bool { // to the output will be written to the new destination in addition to all the others. // This method is thread-safe. func (o *Output) Add(dst io.Writer) { - o.Mutex.Lock() - defer o.Mutex.Unlock() + o.Lock() + defer o.Unlock() o.dests = append(o.dests, dst) } @@ -42,8 +42,8 @@ func (o *Output) Add(dst io.Writer) { // destination in addition to all the others. This method is thread-safe. func (o *Output) Set(dst io.Writer) { o.Close() - o.Mutex.Lock() - defer o.Mutex.Unlock() + o.Lock() + defer o.Unlock() o.dests = []io.Writer{dst} } @@ -96,8 +96,8 @@ func (o *Output) AddString(dst *string) error { // Write writes the same data to all registered destinations. // This method is thread-safe. func (o *Output) Write(p []byte) (n int, err error) { - o.Mutex.Lock() - defer o.Mutex.Unlock() + o.Lock() + defer o.Unlock() o.used = true var firstErr error for _, dst := range o.dests { @@ -113,8 +113,8 @@ func (o *Output) Write(p []byte) (n int, err error) { // AddTail and AddString tasks to complete. // The Close method of each destination is called if it exists. func (o *Output) Close() error { - o.Mutex.Lock() - defer o.Mutex.Unlock() + o.Lock() + defer o.Unlock() var firstErr error for _, dst := range o.dests { if closer, ok := dst.(io.WriteCloser); ok {