Fixing assignment of containerName and adding space between external imports and golibs

This commit is contained in:
Jose I. Monreal Bailey 2015-08-14 12:12:44 -03:00
parent 96a7710a45
commit 6573abf96d

View File

@ -17,6 +17,7 @@ package stdout
import ( import (
"bytes" "bytes"
"fmt" "fmt"
info "github.com/google/cadvisor/info/v1" info "github.com/google/cadvisor/info/v1"
) )
@ -84,11 +85,9 @@ func (driver *stdoutStorage) AddStats(ref info.ContainerReference, stats *info.C
return nil return nil
} }
var containerName string containerName := ref.Name
if len(ref.Aliases) > 0 { if len(ref.Aliases) > 0 {
containerName = ref.Aliases[0] containerName = ref.Aliases[0]
} else {
containerName = ref.Name
} }
var buffer bytes.Buffer var buffer bytes.Buffer