re-order the import package

This commit is contained in:
Lei Xue 2015-11-30 16:43:22 +08:00
parent 0dbcb66c07
commit dbbe38dfed
51 changed files with 84 additions and 34 deletions

View File

@ -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 (

View File

@ -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 (

View File

@ -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"
)

View File

@ -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.

View File

@ -19,6 +19,7 @@ import (
"time"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@ -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")

View File

@ -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.

View File

@ -27,6 +27,7 @@ import (
info "github.com/google/cadvisor/info/v1"
itest "github.com/google/cadvisor/info/v1/test"
"github.com/kr/pretty"
)

View File

@ -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() {

View File

@ -25,6 +25,7 @@ import (
info "github.com/google/cadvisor/info/v1"
infoV2 "github.com/google/cadvisor/info/v2"
"github.com/kr/pretty"
)

View File

@ -19,6 +19,7 @@ import (
"time"
"github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
)

View File

@ -23,6 +23,7 @@ import (
"testing"
"github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
)

View File

@ -22,6 +22,7 @@ import (
"testing"
"github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
)

View File

@ -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"
)

View File

@ -19,8 +19,9 @@ import (
"sync"
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/fs"
"github.com/golang/glog"
)
type fsHandler interface {

View File

@ -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"

View File

@ -20,6 +20,7 @@ import (
"path"
"github.com/google/cadvisor/utils"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
)

View File

@ -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"
)

View File

@ -16,6 +16,7 @@ package container
import (
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/mock"
)

View File

@ -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")

View File

@ -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"

View File

@ -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

View File

@ -19,6 +19,7 @@ import (
"time"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
)

View File

@ -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"
@ -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"
)

View File

@ -28,8 +28,9 @@ import (
"sync"
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/integration/common"
"github.com/golang/glog"
)
const cadvisorBinary = "cadvisor"

View File

@ -18,6 +18,7 @@ import (
"testing"
"github.com/google/cadvisor/integration/framework"
"github.com/stretchr/testify/assert"
)

View File

@ -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"
)

View File

@ -19,6 +19,7 @@ import (
"time"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
)

View File

@ -28,8 +28,6 @@ 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"
@ -37,6 +35,9 @@ import (
"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.

View File

@ -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"
)

View File

@ -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"
@ -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.")

View File

@ -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"
@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -24,6 +24,7 @@ import (
"time"
info "github.com/google/cadvisor/info/v1"
"github.com/prometheus/client_golang/prometheus"
)

View File

@ -25,9 +25,10 @@ import (
"strings"
"time"
"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
"github.com/golang/glog"
)
const ContainersPage = "/containers/"

View File

@ -22,10 +22,11 @@ import (
"strconv"
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/container/docker"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
"github.com/golang/glog"
)
const DockerPage = "/docker/"

View File

@ -21,11 +21,12 @@ import (
"net/url"
"strings"
auth "github.com/abbot/go-http-auth"
"github.com/golang/glog"
httpmux "github.com/google/cadvisor/http/mux"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
auth "github.com/abbot/go-http-auth"
"github.com/golang/glog"
)
var pageTemplate *template.Template

View File

@ -18,6 +18,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/bigquery/client"
bigquery "google.golang.org/api/bigquery/v2"
)

View File

@ -21,6 +21,7 @@ import (
info "github.com/google/cadvisor/info/v1"
storage "github.com/google/cadvisor/storage"
"gopkg.in/olivere/elastic.v2"
)

View File

@ -20,6 +20,7 @@ import (
"time"
info "github.com/google/cadvisor/info/v1"
influxdb "github.com/influxdb/influxdb/client"
)

View File

@ -26,6 +26,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/test"
influxdb "github.com/influxdb/influxdb/client"
)

View File

@ -19,9 +19,10 @@ import (
"sync"
"time"
redis "github.com/garyburd/redigo/redis"
info "github.com/google/cadvisor/info/v1"
storage "github.com/google/cadvisor/storage"
redis "github.com/garyburd/redigo/redis"
)
type redisStorage struct {

View File

@ -16,6 +16,7 @@ package test
import (
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/mock"
)

View File

@ -20,7 +20,6 @@ import (
"os"
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/cache/memory"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/bigquery"
@ -29,6 +28,8 @@ import (
"github.com/google/cadvisor/storage/redis"
"github.com/google/cadvisor/storage/statsd"
"github.com/google/cadvisor/storage/stdout"
"github.com/golang/glog"
)
var argDbUsername = flag.String("storage_driver_user", "root", "database username")

View File

@ -18,6 +18,7 @@ import (
"strings"
info "github.com/google/cadvisor/info/v1"
"google.golang.org/cloud/compute/metadata"
)

View File

@ -17,8 +17,9 @@ package cpuload
import (
"fmt"
"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
"github.com/golang/glog"
"github.com/google/cadvisor/utils/cpuload/netlink"
)

View File

@ -18,8 +18,9 @@ import (
"fmt"
"os"
"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
"github.com/golang/glog"
)
type NetlinkReader struct {

View File

@ -25,11 +25,12 @@ import (
"runtime"
"syscall"
"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/utils/sysinfo"
"github.com/golang/glog"
)
// The utils/machine package contains functions that extract machine-level specs.

View File

@ -25,8 +25,9 @@ import (
"strconv"
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/utils"
"github.com/golang/glog"
)
var (

View File

@ -25,10 +25,10 @@ import (
"path"
"strings"
"github.com/google/cadvisor/manager"
"github.com/google/cadvisor/container/docker"
"github.com/google/cadvisor/manager"
"github.com/google/cadvisor/utils"
"github.com/opencontainers/runc/libcontainer/cgroups"
)