Skip to content

Commit

Permalink
re-order the import package
Browse files Browse the repository at this point in the history
  • Loading branch information
carmark committed Nov 30, 2015
1 parent 0dbcb66 commit dbbe38d
Show file tree
Hide file tree
Showing 51 changed files with 84 additions and 34 deletions.
3 changes: 2 additions & 1 deletion api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ import (
"strings"
"time"

"github.com/golang/glog"
"github.com/google/cadvisor/events"
httpmux "github.com/google/cadvisor/http/mux"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"

"github.com/golang/glog"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion api/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ import (
"strconv"
"time"

"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/info/v2"
"github.com/google/cadvisor/manager"

"github.com/golang/glog"
)

const (
Expand Down
1 change: 1 addition & 0 deletions api/versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/google/cadvisor/events"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/info/v2"

"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion cache/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import (
"sync"
"time"

"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/utils"

"github.com/golang/glog"
)

// TODO(vmarmol): See about refactoring this class, we have an unecessary redirection of containerCache and InMemoryCache.
Expand Down
1 change: 1 addition & 0 deletions cache/memory/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"time"

info "github.com/google/cadvisor/info/v1"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
3 changes: 2 additions & 1 deletion cadvisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ import (
"syscall"
"time"

"github.com/golang/glog"
cadvisorhttp "github.com/google/cadvisor/http"
"github.com/google/cadvisor/manager"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/version"

"github.com/golang/glog"
)

var argIp = flag.String("listen_ip", "", "IP to listen on, defaults to all IPs")
Expand Down
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import (
"path"
"strings"

"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"

"github.com/golang/glog"
)

// Client represents the base URL for a cAdvisor client.
Expand Down
1 change: 1 addition & 0 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

info "github.com/google/cadvisor/info/v1"
itest "github.com/google/cadvisor/info/v1/test"

"github.com/kr/pretty"
)

Expand Down
3 changes: 2 additions & 1 deletion client/clientexample/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ package main
import (
"flag"

"github.com/golang/glog"
"github.com/google/cadvisor/client"
info "github.com/google/cadvisor/info/v1"

"github.com/golang/glog"
)

func staticClientExample() {
Expand Down
1 change: 1 addition & 0 deletions client/v2/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

info "github.com/google/cadvisor/info/v1"
infoV2 "github.com/google/cadvisor/info/v2"

"github.com/kr/pretty"
)

Expand Down
1 change: 1 addition & 0 deletions collector/collector_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"time"

"github.com/google/cadvisor/info/v1"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions collector/generic_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"testing"

"github.com/google/cadvisor/info/v1"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions collector/prometheus_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"testing"

"github.com/google/cadvisor/info/v1"

"github.com/stretchr/testify/assert"
)

Expand Down
5 changes: 3 additions & 2 deletions container/docker/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ import (
"strings"
"sync"

"github.com/fsouza/go-dockerclient"
"github.com/golang/glog"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/fs"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"

"github.com/fsouza/go-dockerclient"
"github.com/golang/glog"
"github.com/opencontainers/runc/libcontainer/cgroups"
)

Expand Down
3 changes: 2 additions & 1 deletion container/docker/fsHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ import (
"sync"
"time"

"github.com/golang/glog"
"github.com/google/cadvisor/fs"

"github.com/golang/glog"
)

type fsHandler interface {
Expand Down
3 changes: 2 additions & 1 deletion container/docker/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ import (
"strings"
"time"

docker "github.com/fsouza/go-dockerclient"
"github.com/google/cadvisor/container"
containerlibcontainer "github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/fs"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"

docker "github.com/fsouza/go-dockerclient"
"github.com/opencontainers/runc/libcontainer/cgroups"
cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs"
libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs"
Expand Down
1 change: 1 addition & 0 deletions container/libcontainer/compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"path"

"github.com/google/cadvisor/utils"

"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
)
Expand Down
3 changes: 2 additions & 1 deletion container/libcontainer/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import (
"strings"
"time"

"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"

"github.com/golang/glog"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/cgroups"
)
Expand Down
1 change: 1 addition & 0 deletions container/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package container

import (
info "github.com/google/cadvisor/info/v1"

"github.com/stretchr/testify/mock"
)

Expand Down
3 changes: 2 additions & 1 deletion container/raw/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import (
"flag"
"fmt"

"github.com/golang/glog"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/fs"
info "github.com/google/cadvisor/info/v1"

"github.com/golang/glog"
)

var dockerOnly = flag.Bool("docker_only", false, "Only report docker containers in addition to root stats")
Expand Down
3 changes: 2 additions & 1 deletion container/raw/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ import (
"strings"
"time"

"github.com/golang/glog"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/fs"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"
"github.com/google/cadvisor/utils/machine"

"github.com/golang/glog"
"github.com/opencontainers/runc/libcontainer/cgroups"
cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs"
"github.com/opencontainers/runc/libcontainer/configs"
Expand Down
3 changes: 2 additions & 1 deletion events/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import (
"sync"
"time"

"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"

"github.com/golang/glog"
)

type byTimestamp []*info.Event
Expand Down
1 change: 1 addition & 0 deletions events/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"time"

info "github.com/google/cadvisor/info/v1"

"github.com/stretchr/testify/assert"
)

Expand Down
5 changes: 3 additions & 2 deletions http/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
"fmt"
"net/http"

auth "github.com/abbot/go-http-auth"
"github.com/golang/glog"
"github.com/google/cadvisor/api"
"github.com/google/cadvisor/healthz"
httpmux "github.com/google/cadvisor/http/mux"
Expand All @@ -28,6 +26,9 @@ import (
"github.com/google/cadvisor/pages"
"github.com/google/cadvisor/pages/static"
"github.com/google/cadvisor/validate"

auth "github.com/abbot/go-http-auth"
"github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus"
)

Expand Down
3 changes: 2 additions & 1 deletion integration/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import (
"sync"
"time"

"github.com/golang/glog"
"github.com/google/cadvisor/integration/common"

"github.com/golang/glog"
)

const cadvisorBinary = "cadvisor"
Expand Down
1 change: 1 addition & 0 deletions integration/tests/api/attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"testing"

"github.com/google/cadvisor/integration/framework"

"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions integration/tests/api/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/integration/framework"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
1 change: 1 addition & 0 deletions integration/tests/api/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"time"

info "github.com/google/cadvisor/info/v1"

"github.com/stretchr/testify/assert"
)

Expand Down
5 changes: 3 additions & 2 deletions manager/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ import (
"sync"
"time"

"github.com/docker/docker/pkg/units"
"github.com/golang/glog"
"github.com/google/cadvisor/cache/memory"
"github.com/google/cadvisor/collector"
"github.com/google/cadvisor/container"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/info/v2"
"github.com/google/cadvisor/summary"
"github.com/google/cadvisor/utils/cpuload"

"github.com/docker/docker/pkg/units"
"github.com/golang/glog"
)

// Housekeeping interval.
Expand Down
1 change: 1 addition & 0 deletions manager/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/google/cadvisor/container"
info "github.com/google/cadvisor/info/v1"
itest "github.com/google/cadvisor/info/v1/test"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
3 changes: 2 additions & 1 deletion manager/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"strings"
"syscall"

"github.com/golang/glog"
"github.com/google/cadvisor/container/docker"
"github.com/google/cadvisor/fs"
info "github.com/google/cadvisor/info/v1"
Expand All @@ -30,6 +29,8 @@ import (
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/utils/sysinfo"
version "github.com/google/cadvisor/version"

"github.com/golang/glog"
)

var machineIdFilePath = flag.String("machine_id_file", "/etc/machine-id,/var/lib/dbus/machine-id", "Comma-separated list of files to check for machine-id. Use the first one that exists.")
Expand Down
3 changes: 2 additions & 1 deletion manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"sync"
"time"

"github.com/golang/glog"
"github.com/google/cadvisor/cache/memory"
"github.com/google/cadvisor/collector"
"github.com/google/cadvisor/container"
Expand All @@ -39,6 +38,8 @@ import (
"github.com/google/cadvisor/utils/cpuload"
"github.com/google/cadvisor/utils/oomparser"
"github.com/google/cadvisor/utils/sysfs"

"github.com/golang/glog"
"github.com/opencontainers/runc/libcontainer/cgroups"
)

Expand Down
1 change: 1 addition & 0 deletions manager/manager_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/google/cadvisor/events"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/info/v2"

"github.com/stretchr/testify/mock"
)

Expand Down
3 changes: 2 additions & 1 deletion metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import (
"fmt"
"time"

"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"

"github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus"
)

Expand Down
1 change: 1 addition & 0 deletions metrics/prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"time"

info "github.com/google/cadvisor/info/v1"

"github.com/prometheus/client_golang/prometheus"
)

Expand Down
Loading

0 comments on commit dbbe38d

Please sign in to comment.