remove useless anonymous field mentions

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux 2014-01-23 16:20:51 -08:00
parent e7a9d23640
commit 42e35ecff3
1 changed files with 10 additions and 10 deletions

View File

@ -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 {