diff --git a/cmd/cloudinitexecute/cloudinitexecute.go b/cmd/cloudinitexecute/cloudinitexecute.go index 9ba35b12..41086cc4 100644 --- a/cmd/cloudinitexecute/cloudinitexecute.go +++ b/cmd/cloudinitexecute/cloudinitexecute.go @@ -15,6 +15,7 @@ import ( "github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" + "golang.org/x/net/context" ) diff --git a/cmd/cloudinitsave/cloudinitsave.go b/cmd/cloudinitsave/cloudinitsave.go index 86570fd0..51d4acd4 100644 --- a/cmd/cloudinitsave/cloudinitsave.go +++ b/cmd/cloudinitsave/cloudinitsave.go @@ -24,8 +24,6 @@ import ( "sync" "time" - yaml "github.com/cloudfoundry-incubator/candiedyaml" - "github.com/rancher/os/cmd/control" "github.com/rancher/os/cmd/network" rancherConfig "github.com/rancher/os/config" @@ -46,6 +44,8 @@ import ( "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/util" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" ) const ( diff --git a/cmd/control/autologin.go b/cmd/control/autologin.go index 75afebda..84ca7711 100644 --- a/cmd/control/autologin.go +++ b/cmd/control/autologin.go @@ -8,9 +8,10 @@ import ( "runtime" "strings" - "github.com/codegangsta/cli" "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" ) func AutologinMain() { diff --git a/cmd/control/cli.go b/cmd/control/cli.go index 8ce2cb10..3b15edf5 100644 --- a/cmd/control/cli.go +++ b/cmd/control/cli.go @@ -4,10 +4,11 @@ import ( "fmt" "os" - "github.com/codegangsta/cli" "github.com/rancher/os/cmd/control/service" "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" ) func Main() { diff --git a/cmd/control/config.go b/cmd/control/config.go index 09666525..53837517 100644 --- a/cmd/control/config.go +++ b/cmd/control/config.go @@ -11,13 +11,13 @@ import ( "strings" "text/template" - yaml "github.com/cloudfoundry-incubator/candiedyaml" + "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/util" + yaml "github.com/cloudfoundry-incubator/candiedyaml" "github.com/codegangsta/cli" "github.com/pkg/errors" - "github.com/rancher/os/config" - "github.com/rancher/os/pkg/util" ) func configSubcommands() []cli.Command { diff --git a/cmd/control/config_test.go b/cmd/control/config_test.go index 4ff55eff..f89c94e2 100644 --- a/cmd/control/config_test.go +++ b/cmd/control/config_test.go @@ -2,11 +2,11 @@ package control import ( "bytes" + "os" "strings" "testing" "github.com/stretchr/testify/require" - "os" ) func TestGenTpl(t *testing.T) { diff --git a/cmd/control/console.go b/cmd/control/console.go index bffe42ae..92d0b473 100644 --- a/cmd/control/console.go +++ b/cmd/control/console.go @@ -5,12 +5,6 @@ import ( "sort" "strings" - "golang.org/x/net/context" - - "github.com/codegangsta/cli" - "github.com/docker/docker/reference" - composeConfig "github.com/docker/libcompose/config" - "github.com/docker/libcompose/project/options" "github.com/rancher/os/cmd/control/service" "github.com/rancher/os/config" "github.com/rancher/os/pkg/compose" @@ -18,6 +12,12 @@ import ( "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util/network" + + "github.com/codegangsta/cli" + "github.com/docker/docker/reference" + composeConfig "github.com/docker/libcompose/config" + "github.com/docker/libcompose/project/options" + "golang.org/x/net/context" ) func consoleSubcommands() []cli.Command { diff --git a/cmd/control/console_init.go b/cmd/control/console_init.go index bb2e96b3..d15b363f 100644 --- a/cmd/control/console_init.go +++ b/cmd/control/console_init.go @@ -11,16 +11,16 @@ import ( "strings" "syscall" - "github.com/codegangsta/cli" - "golang.org/x/crypto/ssh/terminal" - "golang.org/x/sys/unix" - "github.com/rancher/os/cmd/cloudinitexecute" "github.com/rancher/os/config" "github.com/rancher/os/config/cmdline" "github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" + + "github.com/codegangsta/cli" + "golang.org/x/crypto/ssh/terminal" + "golang.org/x/sys/unix" ) const ( diff --git a/cmd/control/dev.go b/cmd/control/dev.go index b26aa9df..c1dd4037 100644 --- a/cmd/control/dev.go +++ b/cmd/control/dev.go @@ -3,8 +3,9 @@ package control import ( "fmt" - "github.com/codegangsta/cli" "github.com/rancher/os/pkg/util" + + "github.com/codegangsta/cli" ) func devAction(c *cli.Context) error { diff --git a/cmd/control/docker_init.go b/cmd/control/docker_init.go index 874a6411..6b3176b7 100644 --- a/cmd/control/docker_init.go +++ b/cmd/control/docker_init.go @@ -9,9 +9,10 @@ import ( "syscall" "time" - "github.com/codegangsta/cli" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" + + "github.com/codegangsta/cli" ) const ( diff --git a/cmd/control/engine.go b/cmd/control/engine.go index 585ae5d5..285c4691 100644 --- a/cmd/control/engine.go +++ b/cmd/control/engine.go @@ -10,7 +10,14 @@ import ( "strconv" "strings" - "golang.org/x/net/context" + "github.com/rancher/os/cmd/control/service" + "github.com/rancher/os/cmd/control/service/app" + "github.com/rancher/os/config" + "github.com/rancher/os/pkg/compose" + "github.com/rancher/os/pkg/docker" + "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/util" + "github.com/rancher/os/pkg/util/network" yaml "github.com/cloudfoundry-incubator/candiedyaml" "github.com/codegangsta/cli" @@ -21,14 +28,7 @@ import ( "github.com/docker/libcompose/project/options" composeYaml "github.com/docker/libcompose/yaml" "github.com/pkg/errors" - "github.com/rancher/os/cmd/control/service" - "github.com/rancher/os/cmd/control/service/app" - "github.com/rancher/os/config" - "github.com/rancher/os/pkg/compose" - "github.com/rancher/os/pkg/docker" - "github.com/rancher/os/pkg/log" - "github.com/rancher/os/pkg/util" - "github.com/rancher/os/pkg/util/network" + "golang.org/x/net/context" ) var ( diff --git a/cmd/control/entrypoint.go b/cmd/control/entrypoint.go index 666ca699..8710db9f 100644 --- a/cmd/control/entrypoint.go +++ b/cmd/control/entrypoint.go @@ -5,14 +5,14 @@ import ( "os/exec" "syscall" - "github.com/codegangsta/cli" - "github.com/rancher/os/pkg/log" - "golang.org/x/net/context" - "github.com/rancher/os/cmd/cloudinitexecute" "github.com/rancher/os/config" "github.com/rancher/os/pkg/docker" + "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" + + "github.com/codegangsta/cli" + "golang.org/x/net/context" ) const ( diff --git a/cmd/control/env.go b/cmd/control/env.go index 7a598eeb..70350a78 100644 --- a/cmd/control/env.go +++ b/cmd/control/env.go @@ -6,9 +6,10 @@ import ( "os/exec" "syscall" - "github.com/codegangsta/cli" "github.com/rancher/os/config" "github.com/rancher/os/pkg/util" + + "github.com/codegangsta/cli" ) func envAction(c *cli.Context) error { diff --git a/cmd/control/install.go b/cmd/control/install.go index ef08e9f5..7a588959 100644 --- a/cmd/control/install.go +++ b/cmd/control/install.go @@ -14,16 +14,16 @@ import ( "strconv" "strings" - "github.com/rancher/os/pkg/log" - - "github.com/codegangsta/cli" - "github.com/pkg/errors" "github.com/rancher/catalog-service/utils/version" "github.com/rancher/os/cmd/control/install" "github.com/rancher/os/cmd/power" "github.com/rancher/os/config" "github.com/rancher/os/pkg/dfs" // TODO: move CopyFile into util or something. + "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" + + "github.com/codegangsta/cli" + "github.com/pkg/errors" ) var installCommand = cli.Command{ diff --git a/cmd/control/os.go b/cmd/control/os.go index 5fc44885..0ddcfbe5 100644 --- a/cmd/control/os.go +++ b/cmd/control/os.go @@ -8,21 +8,20 @@ import ( "runtime" "strings" - "golang.org/x/net/context" - - yaml "github.com/cloudfoundry-incubator/candiedyaml" - "github.com/rancher/os/pkg/log" - - "github.com/codegangsta/cli" - dockerClient "github.com/docker/engine-api/client" - composeConfig "github.com/docker/libcompose/config" - "github.com/docker/libcompose/project/options" "github.com/rancher/os/cmd/power" "github.com/rancher/os/config" "github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/docker" + "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util/network" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" + "github.com/codegangsta/cli" + dockerClient "github.com/docker/engine-api/client" + composeConfig "github.com/docker/libcompose/config" + "github.com/docker/libcompose/project/options" + "golang.org/x/net/context" ) type Images struct { diff --git a/cmd/control/preload.go b/cmd/control/preload.go index f7a829dd..01dada41 100644 --- a/cmd/control/preload.go +++ b/cmd/control/preload.go @@ -11,13 +11,13 @@ import ( "regexp" "strings" - "github.com/codegangsta/cli" - - dockerClient "github.com/docker/engine-api/client" - "github.com/docker/engine-api/types" "github.com/rancher/os/config" "github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" + dockerClient "github.com/docker/engine-api/client" + "github.com/docker/engine-api/types" ) const ( diff --git a/cmd/control/recovery_init.go b/cmd/control/recovery_init.go index 705a469d..659e2cc9 100644 --- a/cmd/control/recovery_init.go +++ b/cmd/control/recovery_init.go @@ -5,8 +5,9 @@ import ( "os/exec" "syscall" - "github.com/codegangsta/cli" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" ) func recoveryInitAction(c *cli.Context) error { diff --git a/cmd/control/selinux.go b/cmd/control/selinux.go index a3bfa4f8..7ea7b317 100644 --- a/cmd/control/selinux.go +++ b/cmd/control/selinux.go @@ -4,8 +4,9 @@ import ( "fmt" "syscall" - "github.com/codegangsta/cli" "github.com/rancher/os/config" + + "github.com/codegangsta/cli" ) func selinuxCommand() cli.Command { diff --git a/cmd/control/service/app/app.go b/cmd/control/service/app/app.go index 04aa95dc..e0815c09 100644 --- a/cmd/control/service/app/app.go +++ b/cmd/control/service/app/app.go @@ -8,11 +8,11 @@ import ( "syscall" "github.com/rancher/os/pkg/log" - "golang.org/x/net/context" "github.com/codegangsta/cli" "github.com/docker/libcompose/project" "github.com/docker/libcompose/project/options" + "golang.org/x/net/context" ) func ProjectPs(p project.APIProject, c *cli.Context) error { diff --git a/cmd/control/service/command/command.go b/cmd/control/service/command/command.go index b1b7ad69..6f661074 100644 --- a/cmd/control/service/command/command.go +++ b/cmd/control/service/command/command.go @@ -3,9 +3,10 @@ package command import ( "errors" + "github.com/rancher/os/cmd/control/service/app" + "github.com/codegangsta/cli" composeApp "github.com/docker/libcompose/cli/app" - "github.com/rancher/os/cmd/control/service/app" ) func verifyOneOrMoreServices(c *cli.Context) error { diff --git a/cmd/control/service/service.go b/cmd/control/service/service.go index f0a3b296..6dcbe77e 100644 --- a/cmd/control/service/service.go +++ b/cmd/control/service/service.go @@ -4,15 +4,16 @@ import ( "fmt" "strings" - "github.com/codegangsta/cli" - dockerApp "github.com/docker/libcompose/cli/docker/app" - "github.com/docker/libcompose/project" "github.com/rancher/os/cmd/control/service/command" "github.com/rancher/os/config" "github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util/network" + + "github.com/codegangsta/cli" + dockerApp "github.com/docker/libcompose/cli/docker/app" + "github.com/docker/libcompose/project" ) type projectFactory struct { diff --git a/cmd/control/switch_console.go b/cmd/control/switch_console.go index fb5ccc3b..2aac8439 100644 --- a/cmd/control/switch_console.go +++ b/cmd/control/switch_console.go @@ -3,11 +3,12 @@ package control import ( "errors" - "github.com/codegangsta/cli" - "github.com/docker/libcompose/project/options" "github.com/rancher/os/config" "github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" + "github.com/docker/libcompose/project/options" "golang.org/x/net/context" ) diff --git a/cmd/control/tlsconf.go b/cmd/control/tlsconf.go index 3764f15e..6fa7ac02 100644 --- a/cmd/control/tlsconf.go +++ b/cmd/control/tlsconf.go @@ -5,12 +5,12 @@ import ( "os" "path/filepath" + "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/util" "github.com/codegangsta/cli" machineUtil "github.com/docker/machine/utils" - "github.com/rancher/os/config" - "github.com/rancher/os/pkg/util" ) const ( diff --git a/cmd/control/udevsettle.go b/cmd/control/udevsettle.go index f185da94..dffaf718 100644 --- a/cmd/control/udevsettle.go +++ b/cmd/control/udevsettle.go @@ -4,8 +4,9 @@ import ( "os" "os/exec" - "github.com/codegangsta/cli" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" ) func udevSettleAction(c *cli.Context) { diff --git a/cmd/control/user_docker.go b/cmd/control/user_docker.go index ba337f32..0df850cc 100644 --- a/cmd/control/user_docker.go +++ b/cmd/control/user_docker.go @@ -5,21 +5,20 @@ import ( "io/ioutil" "os" "path" + "path/filepath" "syscall" "time" - "golang.org/x/net/context" - - "path/filepath" - - "github.com/codegangsta/cli" - composeClient "github.com/docker/libcompose/docker/client" - "github.com/docker/libcompose/project" "github.com/rancher/os/config" "github.com/rancher/os/pkg/compose" rosDocker "github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" + + "github.com/codegangsta/cli" + composeClient "github.com/docker/libcompose/docker/client" + "github.com/docker/libcompose/project" + "golang.org/x/net/context" ) const ( diff --git a/cmd/init/init.go b/cmd/init/init.go index 2ca87f91..4cdd69c9 100644 --- a/cmd/init/init.go +++ b/cmd/init/init.go @@ -5,23 +5,21 @@ package init import ( "fmt" - "github.com/rancher/os/pkg/init/selinux" - - "github.com/rancher/os/pkg/init/docker" - "github.com/rancher/os/pkg/init/one" - "github.com/rancher/os/config" "github.com/rancher/os/pkg/dfs" "github.com/rancher/os/pkg/init/b2d" "github.com/rancher/os/pkg/init/cloudinit" "github.com/rancher/os/pkg/init/configfiles" "github.com/rancher/os/pkg/init/debug" + "github.com/rancher/os/pkg/init/docker" "github.com/rancher/os/pkg/init/env" "github.com/rancher/os/pkg/init/fsmount" "github.com/rancher/os/pkg/init/hypervisor" "github.com/rancher/os/pkg/init/modules" + "github.com/rancher/os/pkg/init/one" "github.com/rancher/os/pkg/init/prepare" "github.com/rancher/os/pkg/init/recovery" + "github.com/rancher/os/pkg/init/selinux" "github.com/rancher/os/pkg/init/sharedroot" "github.com/rancher/os/pkg/init/switchroot" "github.com/rancher/os/pkg/log" diff --git a/cmd/network/network.go b/cmd/network/network.go index b1166cd8..b4f89a8f 100644 --- a/cmd/network/network.go +++ b/cmd/network/network.go @@ -1,17 +1,16 @@ package network import ( - "golang.org/x/net/context" - - "github.com/rancher/os/pkg/docker" - "github.com/rancher/os/pkg/log" - "io/ioutil" - "github.com/docker/libnetwork/resolvconf" "github.com/rancher/os/config" + "github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/hostname" + "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/netconf" + + "github.com/docker/libnetwork/resolvconf" + "golang.org/x/net/context" ) func Main() { diff --git a/cmd/power/power.go b/cmd/power/power.go index f4495a66..2d39a9ed 100644 --- a/cmd/power/power.go +++ b/cmd/power/power.go @@ -10,17 +10,16 @@ import ( "syscall" "time" - "golang.org/x/net/context" + "github.com/rancher/os/cmd/control/install" + "github.com/rancher/os/config" + "github.com/rancher/os/pkg/docker" + "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/util" "github.com/docker/engine-api/types" "github.com/docker/engine-api/types/container" "github.com/docker/engine-api/types/filters" - "github.com/rancher/os/cmd/control/install" - "github.com/rancher/os/config" - "github.com/rancher/os/pkg/log" - - "github.com/rancher/os/pkg/docker" - "github.com/rancher/os/pkg/util" + "golang.org/x/net/context" ) // You can't shutdown the system from a process in console because we want to stop the console container. diff --git a/cmd/power/shutdown.go b/cmd/power/shutdown.go index daa11ad7..20ac68d5 100644 --- a/cmd/power/shutdown.go +++ b/cmd/power/shutdown.go @@ -7,10 +7,11 @@ import ( "path/filepath" "syscall" - "github.com/codegangsta/cli" "github.com/rancher/os/cmd/control/install" "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" ) var ( diff --git a/cmd/respawn/respawn.go b/cmd/respawn/respawn.go index 9fc9090c..e1b909f7 100644 --- a/cmd/respawn/respawn.go +++ b/cmd/respawn/respawn.go @@ -13,9 +13,10 @@ import ( "syscall" "time" - "github.com/codegangsta/cli" "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + + "github.com/codegangsta/cli" ) var ( diff --git a/config/cloudinit/datasource/configdrive/configdrive.go b/config/cloudinit/datasource/configdrive/configdrive.go index b1b09ba2..15a37be5 100644 --- a/config/cloudinit/datasource/configdrive/configdrive.go +++ b/config/cloudinit/datasource/configdrive/configdrive.go @@ -22,11 +22,11 @@ import ( "path" "syscall" + "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/util" "github.com/docker/docker/pkg/mount" - "github.com/rancher/os/config/cloudinit/datasource" - "github.com/rancher/os/pkg/util" ) const ( diff --git a/config/cloudinit/datasource/metadata/aliyun/metadata.go b/config/cloudinit/datasource/metadata/aliyun/metadata.go index 467cb60b..e01f1c9a 100644 --- a/config/cloudinit/datasource/metadata/aliyun/metadata.go +++ b/config/cloudinit/datasource/metadata/aliyun/metadata.go @@ -5,10 +5,9 @@ import ( "log" "strings" - "github.com/rancher/os/pkg/netconf" - "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource/metadata" + "github.com/rancher/os/pkg/netconf" ) const ( diff --git a/config/cloudinit/datasource/metadata/cloudstack/metadata.go b/config/cloudinit/datasource/metadata/cloudstack/metadata.go index f20efffa..2e61a314 100644 --- a/config/cloudinit/datasource/metadata/cloudstack/metadata.go +++ b/config/cloudinit/datasource/metadata/cloudstack/metadata.go @@ -19,12 +19,11 @@ import ( "strconv" "strings" - "github.com/rancher/os/pkg/netconf" - "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/pkg" "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/netconf" ) const ( diff --git a/config/cloudinit/datasource/metadata/digitalocean/metadata.go b/config/cloudinit/datasource/metadata/digitalocean/metadata.go old mode 100755 new mode 100644 index 5974afc6..ef47630a --- a/config/cloudinit/datasource/metadata/digitalocean/metadata.go +++ b/config/cloudinit/datasource/metadata/digitalocean/metadata.go @@ -17,14 +17,12 @@ package digitalocean import ( "encoding/json" "fmt" - "strconv" - - "github.com/rancher/os/pkg/netconf" - "net" + "strconv" "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource/metadata" + "github.com/rancher/os/pkg/netconf" ) const ( diff --git a/config/cloudinit/datasource/metadata/digitalocean/metadata_test.go b/config/cloudinit/datasource/metadata/digitalocean/metadata_test.go old mode 100755 new mode 100644 index 2df116ed..5a28aa8e --- a/config/cloudinit/datasource/metadata/digitalocean/metadata_test.go +++ b/config/cloudinit/datasource/metadata/digitalocean/metadata_test.go @@ -20,12 +20,11 @@ import ( "reflect" "testing" - "github.com/rancher/os/pkg/netconf" - "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata/test" "github.com/rancher/os/config/cloudinit/pkg" + "github.com/rancher/os/pkg/netconf" ) func TestType(t *testing.T) { diff --git a/config/cloudinit/datasource/metadata/ec2/metadata.go b/config/cloudinit/datasource/metadata/ec2/metadata.go index 6ed29070..25d79a2e 100644 --- a/config/cloudinit/datasource/metadata/ec2/metadata.go +++ b/config/cloudinit/datasource/metadata/ec2/metadata.go @@ -20,11 +20,10 @@ import ( "net" "strings" - "github.com/rancher/os/pkg/netconf" - "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/pkg" + "github.com/rancher/os/pkg/netconf" ) const ( diff --git a/config/cloudinit/datasource/metadata/gce/metadata.go b/config/cloudinit/datasource/metadata/gce/metadata.go index c70c094e..b8537e80 100644 --- a/config/cloudinit/datasource/metadata/gce/metadata.go +++ b/config/cloudinit/datasource/metadata/gce/metadata.go @@ -21,8 +21,6 @@ import ( "strconv" "strings" - //"github.com/rancher/os/netconf" - "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource/metadata" ) diff --git a/config/cloudinit/datasource/metadata/gce/metadata_test.go b/config/cloudinit/datasource/metadata/gce/metadata_test.go index c4f1ee24..172cfb2b 100644 --- a/config/cloudinit/datasource/metadata/gce/metadata_test.go +++ b/config/cloudinit/datasource/metadata/gce/metadata_test.go @@ -20,8 +20,6 @@ import ( "reflect" "testing" - //"github.com/rancher/os/netconf" - "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata/test" diff --git a/config/cloudinit/datasource/proccmdline/proc_cmdline.go b/config/cloudinit/datasource/proccmdline/proc_cmdline.go index d5438c65..c774f924 100644 --- a/config/cloudinit/datasource/proccmdline/proc_cmdline.go +++ b/config/cloudinit/datasource/proccmdline/proc_cmdline.go @@ -20,10 +20,9 @@ import ( "io/ioutil" "strings" - "github.com/rancher/os/pkg/log" - "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/pkg" + "github.com/rancher/os/pkg/log" ) const ( diff --git a/config/cloudinit/datasource/vmware/vmware_amd64.go b/config/cloudinit/datasource/vmware/vmware_amd64.go index 41cfc8dd..712fa7fe 100644 --- a/config/cloudinit/datasource/vmware/vmware_amd64.go +++ b/config/cloudinit/datasource/vmware/vmware_amd64.go @@ -18,11 +18,10 @@ import ( "io/ioutil" "os" + "github.com/rancher/os/config/cloudinit/pkg" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" - "github.com/rancher/os/config/cloudinit/pkg" - "github.com/sigma/vmw-guestinfo/rpcvmx" "github.com/sigma/vmw-guestinfo/vmcheck" ovf "github.com/sigma/vmw-ovflib" diff --git a/config/cloudinit/datasource/waagent/waagent.go b/config/cloudinit/datasource/waagent/waagent.go index d132f090..6a50bebb 100644 --- a/config/cloudinit/datasource/waagent/waagent.go +++ b/config/cloudinit/datasource/waagent/waagent.go @@ -22,9 +22,8 @@ import ( "os" "path" - "github.com/rancher/os/pkg/log" - "github.com/rancher/os/config/cloudinit/datasource" + "github.com/rancher/os/pkg/log" ) type Waagent struct { diff --git a/config/cmdline/cmdline.go b/config/cmdline/cmdline.go index 8af4f3fe..4dcb49cb 100644 --- a/config/cmdline/cmdline.go +++ b/config/cmdline/cmdline.go @@ -4,8 +4,9 @@ import ( "io/ioutil" "strings" - yaml "github.com/cloudfoundry-incubator/candiedyaml" "github.com/rancher/os/pkg/util" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" ) func Read(parseAll bool) (m map[interface{}]interface{}, err error) { diff --git a/config/config_test.go b/config/config_test.go index bfbce1c7..a74f3779 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -3,10 +3,10 @@ package config import ( "testing" - yaml "github.com/cloudfoundry-incubator/candiedyaml" - "github.com/rancher/os/config/cmdline" "github.com/rancher/os/pkg/util" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" "github.com/stretchr/testify/require" ) diff --git a/config/disk.go b/config/disk.go index 59be8e30..f1e088e7 100644 --- a/config/disk.go +++ b/config/disk.go @@ -9,14 +9,15 @@ import ( "sort" "strings" - yaml "github.com/cloudfoundry-incubator/candiedyaml" - "github.com/docker/engine-api/types" - composeConfig "github.com/docker/libcompose/config" "github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/initialize" "github.com/rancher/os/config/cmdline" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" + "github.com/docker/engine-api/types" + composeConfig "github.com/docker/libcompose/config" ) func ReadConfig(bytes []byte, substituteMetadataVars bool, files ...string) (*CloudConfig, error) { diff --git a/config/types.go b/config/types.go index d87b5edd..4a839909 100644 --- a/config/types.go +++ b/config/types.go @@ -4,11 +4,12 @@ import ( "fmt" "runtime" - "github.com/docker/engine-api/types" - composeConfig "github.com/docker/libcompose/config" "github.com/rancher/os/config/cloudinit/config" "github.com/rancher/os/config/yaml" "github.com/rancher/os/pkg/netconf" + + "github.com/docker/engine-api/types" + composeConfig "github.com/docker/libcompose/config" ) const ( diff --git a/config/validate_test.go b/config/validate_test.go index 83f8d0a8..7cbe62cc 100644 --- a/config/validate_test.go +++ b/config/validate_test.go @@ -5,8 +5,9 @@ import ( "strings" "testing" - yaml "github.com/cloudfoundry-incubator/candiedyaml" "github.com/rancher/os/pkg/util" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" ) func testValidate(t *testing.T, cfg []byte, contains string) { diff --git a/main.go b/main.go index 10bd68b8..e1d321ff 100644 --- a/main.go +++ b/main.go @@ -4,8 +4,6 @@ import ( "fmt" "os" - "github.com/docker/docker/docker" - "github.com/docker/docker/pkg/reexec" "github.com/rancher/os/cmd/cloudinitexecute" "github.com/rancher/os/cmd/cloudinitsave" "github.com/rancher/os/cmd/control" @@ -16,6 +14,9 @@ import ( "github.com/rancher/os/cmd/sysinit" "github.com/rancher/os/cmd/wait" "github.com/rancher/os/pkg/dfs" + + "github.com/docker/docker/docker" + "github.com/docker/docker/pkg/reexec" ) var entrypoints = map[string]func(){ diff --git a/pkg/compose/project.go b/pkg/compose/project.go index 333663bd..2704d87a 100644 --- a/pkg/compose/project.go +++ b/pkg/compose/project.go @@ -5,7 +5,11 @@ import ( "io/ioutil" "os" - "golang.org/x/net/context" + "github.com/rancher/os/config" + rosDocker "github.com/rancher/os/pkg/docker" + "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/util" + "github.com/rancher/os/pkg/util/network" yaml "github.com/cloudfoundry-incubator/candiedyaml" dockerClient "github.com/docker/engine-api/client" @@ -13,15 +17,10 @@ import ( composeConfig "github.com/docker/libcompose/config" "github.com/docker/libcompose/docker" composeClient "github.com/docker/libcompose/docker/client" - "github.com/docker/libcompose/project" "github.com/docker/libcompose/project/events" "github.com/docker/libcompose/project/options" - "github.com/rancher/os/config" - rosDocker "github.com/rancher/os/pkg/docker" - "github.com/rancher/os/pkg/log" - "github.com/rancher/os/pkg/util" - "github.com/rancher/os/pkg/util/network" + "golang.org/x/net/context" ) func CreateService(cfg *config.CloudConfig, name string, serviceConfig *composeConfig.ServiceConfigV1) (project.Service, error) { diff --git a/pkg/compose/reload.go b/pkg/compose/reload.go index 7eba1e2a..8cb8cf71 100644 --- a/pkg/compose/reload.go +++ b/pkg/compose/reload.go @@ -3,13 +3,14 @@ package compose import ( "fmt" - yaml "github.com/cloudfoundry-incubator/candiedyaml" - composeConfig "github.com/docker/libcompose/config" - "github.com/docker/libcompose/project" "github.com/rancher/os/config" "github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/util/network" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" + composeConfig "github.com/docker/libcompose/config" + "github.com/docker/libcompose/project" ) func LoadService(p *project.Project, cfg *config.CloudConfig, useNetwork bool, service string) error { diff --git a/pkg/dfs/scratch.go b/pkg/dfs/scratch.go index 66a1f6a1..0857c7d6 100644 --- a/pkg/dfs/scratch.go +++ b/pkg/dfs/scratch.go @@ -12,12 +12,12 @@ import ( "syscall" "github.com/rancher/os/pkg/init/one" - - "github.com/docker/libnetwork/resolvconf" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/selinux" "github.com/rancher/os/pkg/util" + + "github.com/docker/libnetwork/resolvconf" ) const ( diff --git a/pkg/docker/auth.go b/pkg/docker/auth.go index a0f9679a..de129580 100644 --- a/pkg/docker/auth.go +++ b/pkg/docker/auth.go @@ -5,11 +5,12 @@ import ( "fmt" "strings" + "github.com/rancher/os/config" + "github.com/rancher/os/pkg/log" + "github.com/docker/docker/registry" "github.com/docker/engine-api/types" "github.com/docker/libcompose/docker" - "github.com/rancher/os/config" - "github.com/rancher/os/pkg/log" ) // ConfigAuthLookup will lookup registry auth info from cloud config diff --git a/pkg/docker/client.go b/pkg/docker/client.go index 1ade19bb..6a1e45a2 100644 --- a/pkg/docker/client.go +++ b/pkg/docker/client.go @@ -1,8 +1,9 @@ package docker import ( - dockerClient "github.com/docker/engine-api/client" "github.com/rancher/os/config" + + dockerClient "github.com/docker/engine-api/client" "golang.org/x/net/context" ) diff --git a/pkg/docker/client_factory.go b/pkg/docker/client_factory.go index 6901872a..98d0d199 100644 --- a/pkg/docker/client_factory.go +++ b/pkg/docker/client_factory.go @@ -4,14 +4,14 @@ import ( "fmt" "sync" - "golang.org/x/net/context" + "github.com/rancher/os/config" + "github.com/rancher/os/pkg/log" + "github.com/rancher/os/pkg/util" dockerclient "github.com/docker/engine-api/client" composeClient "github.com/docker/libcompose/docker/client" "github.com/docker/libcompose/project" - "github.com/rancher/os/config" - "github.com/rancher/os/pkg/log" - "github.com/rancher/os/pkg/util" + "golang.org/x/net/context" ) type ClientFactory struct { diff --git a/pkg/docker/env.go b/pkg/docker/env.go index 5f235cf8..e3d02237 100644 --- a/pkg/docker/env.go +++ b/pkg/docker/env.go @@ -4,9 +4,10 @@ import ( "fmt" "strings" - composeConfig "github.com/docker/libcompose/config" "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + + composeConfig "github.com/docker/libcompose/config" ) type ConfigEnvironment struct { diff --git a/pkg/docker/service.go b/pkg/docker/service.go index 04b0f94e..d34867d5 100644 --- a/pkg/docker/service.go +++ b/pkg/docker/service.go @@ -3,14 +3,15 @@ package docker import ( "fmt" + "github.com/rancher/os/config" + "github.com/rancher/os/pkg/log" + dockerclient "github.com/docker/engine-api/client" "github.com/docker/engine-api/types" composeConfig "github.com/docker/libcompose/config" "github.com/docker/libcompose/docker" "github.com/docker/libcompose/project" "github.com/docker/libcompose/project/options" - "github.com/rancher/os/config" - "github.com/rancher/os/pkg/log" "golang.org/x/net/context" ) diff --git a/pkg/docker/service_factory.go b/pkg/docker/service_factory.go index bd0a4347..ca0d6bfd 100644 --- a/pkg/docker/service_factory.go +++ b/pkg/docker/service_factory.go @@ -1,10 +1,11 @@ package docker import ( + "github.com/rancher/os/pkg/util" + composeConfig "github.com/docker/libcompose/config" "github.com/docker/libcompose/docker" "github.com/docker/libcompose/project" - "github.com/rancher/os/pkg/util" ) type ServiceFactory struct { diff --git a/pkg/docker/util.go b/pkg/docker/util.go index 3bbf4c94..3dd78123 100644 --- a/pkg/docker/util.go +++ b/pkg/docker/util.go @@ -1,8 +1,9 @@ package docker import ( - composeConfig "github.com/docker/libcompose/config" "github.com/rancher/os/config" + + composeConfig "github.com/docker/libcompose/config" ) func IsSystemContainer(serviceConfig *composeConfig.ServiceConfig) bool { diff --git a/pkg/init/recovery/recovery.go b/pkg/init/recovery/recovery.go index 0b51a7d9..7abc3e92 100644 --- a/pkg/init/recovery/recovery.go +++ b/pkg/init/recovery/recovery.go @@ -1,14 +1,15 @@ package recovery import ( - composeConfig "github.com/docker/libcompose/config" - "github.com/docker/libcompose/yaml" "github.com/rancher/os/config" "github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/init/docker" "github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/sysinit" + + composeConfig "github.com/docker/libcompose/config" + "github.com/docker/libcompose/yaml" ) var ( diff --git a/pkg/init/sharedroot/sharedroot.go b/pkg/init/sharedroot/sharedroot.go index 92673ad8..87722c11 100644 --- a/pkg/init/sharedroot/sharedroot.go +++ b/pkg/init/sharedroot/sharedroot.go @@ -3,9 +3,10 @@ package sharedroot import ( "os" - "github.com/docker/docker/pkg/mount" "github.com/rancher/os/config" "github.com/rancher/os/pkg/init/fsmount" + + "github.com/docker/docker/pkg/mount" ) func Setup(c *config.CloudConfig) (*config.CloudConfig, error) { diff --git a/pkg/init/switchroot/root.go b/pkg/init/switchroot/root.go index a1426b7d..3acc4914 100644 --- a/pkg/init/switchroot/root.go +++ b/pkg/init/switchroot/root.go @@ -8,11 +8,12 @@ import ( "strings" "syscall" - "github.com/docker/docker/pkg/archive" "github.com/rancher/os/config" "github.com/rancher/os/pkg/dfs" "github.com/rancher/os/pkg/init/fsmount" "github.com/rancher/os/pkg/log" + + "github.com/docker/docker/pkg/archive" ) func SwitchRoot(cfg *config.CloudConfig) (*config.CloudConfig, error) { diff --git a/pkg/log/log.go b/pkg/log/log.go index 14a19f28..64d8cafb 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -8,10 +8,10 @@ import ( "path/filepath" "strings" + "github.com/rancher/os/config/cmdline" + "github.com/Sirupsen/logrus" lsyslog "github.com/Sirupsen/logrus/hooks/syslog" - - "github.com/rancher/os/config/cmdline" ) var logFile *os.File diff --git a/pkg/netconf/bonding.go b/pkg/netconf/bonding.go index 2194beb2..db1679a9 100644 --- a/pkg/netconf/bonding.go +++ b/pkg/netconf/bonding.go @@ -8,6 +8,7 @@ import ( "time" "github.com/rancher/os/pkg/log" + "github.com/vishvananda/netlink" ) diff --git a/pkg/netconf/netconf_linux.go b/pkg/netconf/netconf_linux.go index c5fca8f8..007932fa 100644 --- a/pkg/netconf/netconf_linux.go +++ b/pkg/netconf/netconf_linux.go @@ -11,9 +11,9 @@ import ( "sync" "syscall" - shlex "github.com/flynn/go-shlex" "github.com/rancher/os/pkg/log" + shlex "github.com/flynn/go-shlex" glob "github.com/ryanuber/go-glob" "github.com/vishvananda/netlink" ) diff --git a/pkg/sysinit/sysinit.go b/pkg/sysinit/sysinit.go index 35f41e5c..07af9b8c 100644 --- a/pkg/sysinit/sysinit.go +++ b/pkg/sysinit/sysinit.go @@ -7,13 +7,14 @@ import ( "path/filepath" "syscall" - "github.com/docker/engine-api/types" - "github.com/docker/libcompose/project/options" "github.com/rancher/os/cmd/control" "github.com/rancher/os/config" "github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/log" + + "github.com/docker/engine-api/types" + "github.com/docker/libcompose/project/options" "golang.org/x/net/context" ) diff --git a/pkg/util/network/network.go b/pkg/util/network/network.go index 25515b79..f37e8e20 100644 --- a/pkg/util/network/network.go +++ b/pkg/util/network/network.go @@ -8,11 +8,11 @@ import ( "os" "strings" - yaml "github.com/cloudfoundry-incubator/candiedyaml" - - composeConfig "github.com/docker/libcompose/config" "github.com/rancher/os/config" "github.com/rancher/os/pkg/log" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" + composeConfig "github.com/docker/libcompose/config" ) var ( diff --git a/pkg/util/util.go b/pkg/util/util.go index e1413cc8..1df70dfb 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -12,8 +12,9 @@ import ( "path" "strings" - yaml "github.com/cloudfoundry-incubator/candiedyaml" osYaml "github.com/rancher/os/config/yaml" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" ) const (