Fixing assignment of containerName and adding space between external imports and golibs
This commit is contained in:
parent
96a7710a45
commit
6573abf96d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user