From e038729d675d7a6620d4e3370949291f5d37bbce Mon Sep 17 00:00:00 2001 From: Abin Shahab Date: Mon, 13 Oct 2014 21:10:20 +0000 Subject: [PATCH] Updated import and comments --- cadvisor.go | 2 +- container/lxc/factory.go | 4 ++-- container/lxc/handler.go | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cadvisor.go b/cadvisor.go index cd4aaac6..ac81ab04 100644 --- a/cadvisor.go +++ b/cadvisor.go @@ -62,7 +62,7 @@ func main() { glog.Errorf("Docker registration failed: %v.", err) } - // Register the raw driver. + // Register the lxc driver. if err := lxc.Register(containerManager); err != nil { glog.Fatalf("lxc registration failed: %v.", err) } diff --git a/container/lxc/factory.go b/container/lxc/factory.go index 72402e02..d9d52fa3 100644 --- a/container/lxc/factory.go +++ b/container/lxc/factory.go @@ -17,11 +17,11 @@ package lxc import ( "fmt" + "strings" "github.com/docker/libcontainer/cgroups" "github.com/golang/glog" "github.com/google/cadvisor/container" "github.com/google/cadvisor/info" - "strings" ) type cgroupSubsystems struct { @@ -47,7 +47,7 @@ func (self *lxcFactory) NewContainerHandler(name string) (container.ContainerHan return newLxcContainerHandler(name, self.cgroupSubsystems, self.machineInfoFactory) } -// The raw factory can handle any container. +// The lxc factory can handle any container. func (self *lxcFactory) CanHandle(name string) (bool, error) { if name == "/lxc" { return true, nil diff --git a/container/lxc/handler.go b/container/lxc/handler.go index 836175fa..a9d16bdb 100644 --- a/container/lxc/handler.go +++ b/container/lxc/handler.go @@ -20,6 +20,10 @@ import ( "code.google.com/p/go.exp/inotify" "flag" "fmt" + "io/ioutil" + "path" + "strconv" + "strings" dockerlibcontainer "github.com/docker/libcontainer" "github.com/docker/libcontainer/cgroups" cgroup_fs "github.com/docker/libcontainer/cgroups/fs" @@ -30,10 +34,6 @@ import ( "github.com/google/cadvisor/fs" "github.com/google/cadvisor/info" "github.com/google/cadvisor/utils" - "io/ioutil" - "path" - "strconv" - "strings" ) var containersDesc = flag.String("cDesc", "/etc/docker/cdesc.json", "container description file")