diff --git a/client/client_test.go b/client/client_test.go index bf4d9f76..94978720 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -79,7 +79,7 @@ func TestGetMachineinfo(t *testing.T) { NumCores: 8, MemoryCapacity: 31625871360, DiskMap: map[string]info.DiskInfo{ - "8:0": info.DiskInfo{ + "8:0": { Name: "sda", Major: 8, Minor: 0, diff --git a/container/docker/handler.go b/container/docker/handler.go index 4f38b14d..6ec8fdf6 100644 --- a/container/docker/handler.go +++ b/container/docker/handler.go @@ -159,7 +159,7 @@ func (self *dockerContainerHandler) readLibcontainerConfig() (*libcontainer.Conf // Translate the old config into the new config. config = oldConfig.Config - for ns, _ := range oldConfig.OldNamespaces { + for ns := range oldConfig.OldNamespaces { config.Namespaces = append(config.Namespaces, libcontainer.Namespace{ Name: ns, }) diff --git a/info/machine.go b/info/machine.go index 5591f3d2..7371548e 100644 --- a/info/machine.go +++ b/info/machine.go @@ -76,7 +76,7 @@ func (self *Node) AddNodeCache(c Cache) { } func (self *Node) AddPerCoreCache(c Cache) { - for idx, _ := range self.Cores { + for idx := range self.Cores { self.Cores[idx].Caches = append(self.Cores[idx].Caches, c) } } diff --git a/pages/docker.go b/pages/docker.go index 793fb458..30a1b19f 100644 --- a/pages/docker.go +++ b/pages/docker.go @@ -43,7 +43,7 @@ func serveDockerPage(m manager.Manager, w http.ResponseWriter, u *url.URL) error data = &pageData{ DisplayName: dockerContainersText, ParentContainers: []link{ - link{ + { Text: dockerContainersText, Link: DockerPage, }}, diff --git a/pages/static/google_jsapi_js.go b/pages/static/google_jsapi_js.go index 3829b2de..9e319b22 100644 --- a/pages/static/google_jsapi_js.go +++ b/pages/static/google_jsapi_js.go @@ -14,7 +14,7 @@ package static -const googleJsapiJs= ` +const googleJsapiJs = ` if(!window['googleLT_']){window['googleLT_']=(new Date()).getTime();}if (!window['google']) { window['google'] = {}; } diff --git a/storage/memory/stats_buffer_test.go b/storage/memory/stats_buffer_test.go index fd1b8e9d..780b15ba 100644 --- a/storage/memory/stats_buffer_test.go +++ b/storage/memory/stats_buffer_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/google/cadvisor/info" - ) func createStats(id int32) *info.ContainerStats {