1
0
mirror of https://github.com/rancher/os.git synced 2025-08-06 09:14:21 +00:00

Imports are organized in groups, with blank lines between them

https://github.com/golang/go/wiki/CodeReviewComments#imports
This commit is contained in:
niusmallnan 2018-10-23 12:13:32 +08:00 committed by niusmallnan
parent ef663b4e70
commit 823ae28a52
66 changed files with 174 additions and 162 deletions

View File

@ -15,6 +15,7 @@ import (
"github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -24,8 +24,6 @@ import (
"sync" "sync"
"time" "time"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/rancher/os/cmd/control" "github.com/rancher/os/cmd/control"
"github.com/rancher/os/cmd/network" "github.com/rancher/os/cmd/network"
rancherConfig "github.com/rancher/os/config" rancherConfig "github.com/rancher/os/config"
@ -46,6 +44,8 @@ import (
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/netconf"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
) )
const ( const (

View File

@ -8,9 +8,10 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/codegangsta/cli"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
) )
func AutologinMain() { func AutologinMain() {

View File

@ -4,10 +4,11 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/codegangsta/cli"
"github.com/rancher/os/cmd/control/service" "github.com/rancher/os/cmd/control/service"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
) )
func Main() { func Main() {

View File

@ -11,13 +11,13 @@ import (
"strings" "strings"
"text/template" "text/template"
yaml "github.com/cloudfoundry-incubator/candiedyaml" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/util"
) )
func configSubcommands() []cli.Command { func configSubcommands() []cli.Command {

View File

@ -2,11 +2,11 @@ package control
import ( import (
"bytes" "bytes"
"os"
"strings" "strings"
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"os"
) )
func TestGenTpl(t *testing.T) { func TestGenTpl(t *testing.T) {

View File

@ -5,12 +5,6 @@ import (
"sort" "sort"
"strings" "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/cmd/control/service"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
@ -18,6 +12,12 @@ import (
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/rancher/os/pkg/util/network" "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 { func consoleSubcommands() []cli.Command {

View File

@ -11,16 +11,16 @@ import (
"strings" "strings"
"syscall" "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/cmd/cloudinitexecute"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/config/cmdline" "github.com/rancher/os/config/cmdline"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/codegangsta/cli"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/sys/unix"
) )
const ( const (

View File

@ -3,8 +3,9 @@ package control
import ( import (
"fmt" "fmt"
"github.com/codegangsta/cli"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/codegangsta/cli"
) )
func devAction(c *cli.Context) error { func devAction(c *cli.Context) error {

View File

@ -9,9 +9,10 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/codegangsta/cli"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/codegangsta/cli"
) )
const ( const (

View File

@ -10,7 +10,14 @@ import (
"strconv" "strconv"
"strings" "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" yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
@ -21,14 +28,7 @@ import (
"github.com/docker/libcompose/project/options" "github.com/docker/libcompose/project/options"
composeYaml "github.com/docker/libcompose/yaml" composeYaml "github.com/docker/libcompose/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/rancher/os/cmd/control/service" "golang.org/x/net/context"
"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"
) )
var ( var (

View File

@ -5,14 +5,14 @@ import (
"os/exec" "os/exec"
"syscall" "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/cmd/cloudinitexecute"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/codegangsta/cli"
"golang.org/x/net/context"
) )
const ( const (

View File

@ -6,9 +6,10 @@ import (
"os/exec" "os/exec"
"syscall" "syscall"
"github.com/codegangsta/cli"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/codegangsta/cli"
) )
func envAction(c *cli.Context) error { func envAction(c *cli.Context) error {

View File

@ -14,16 +14,16 @@ import (
"strconv" "strconv"
"strings" "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/catalog-service/utils/version"
"github.com/rancher/os/cmd/control/install" "github.com/rancher/os/cmd/control/install"
"github.com/rancher/os/cmd/power" "github.com/rancher/os/cmd/power"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/dfs" // TODO: move CopyFile into util or something. "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/rancher/os/pkg/util"
"github.com/codegangsta/cli"
"github.com/pkg/errors"
) )
var installCommand = cli.Command{ var installCommand = cli.Command{

View File

@ -8,21 +8,20 @@ import (
"runtime" "runtime"
"strings" "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/cmd/power"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
"github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/rancher/os/pkg/util/network" "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 { type Images struct {

View File

@ -11,13 +11,13 @@ import (
"regexp" "regexp"
"strings" "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/config"
"github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
dockerClient "github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
) )
const ( const (

View File

@ -5,8 +5,9 @@ import (
"os/exec" "os/exec"
"syscall" "syscall"
"github.com/codegangsta/cli"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
) )
func recoveryInitAction(c *cli.Context) error { func recoveryInitAction(c *cli.Context) error {

View File

@ -4,8 +4,9 @@ import (
"fmt" "fmt"
"syscall" "syscall"
"github.com/codegangsta/cli"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/codegangsta/cli"
) )
func selinuxCommand() cli.Command { func selinuxCommand() cli.Command {

View File

@ -8,11 +8,11 @@ import (
"syscall" "syscall"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"golang.org/x/net/context"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/docker/libcompose/project/options" "github.com/docker/libcompose/project/options"
"golang.org/x/net/context"
) )
func ProjectPs(p project.APIProject, c *cli.Context) error { func ProjectPs(p project.APIProject, c *cli.Context) error {

View File

@ -3,9 +3,10 @@ package command
import ( import (
"errors" "errors"
"github.com/rancher/os/cmd/control/service/app"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
composeApp "github.com/docker/libcompose/cli/app" composeApp "github.com/docker/libcompose/cli/app"
"github.com/rancher/os/cmd/control/service/app"
) )
func verifyOneOrMoreServices(c *cli.Context) error { func verifyOneOrMoreServices(c *cli.Context) error {

View File

@ -4,15 +4,16 @@ import (
"fmt" "fmt"
"strings" "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/cmd/control/service/command"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/rancher/os/pkg/util/network" "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 { type projectFactory struct {

View File

@ -3,11 +3,12 @@ package control
import ( import (
"errors" "errors"
"github.com/codegangsta/cli"
"github.com/docker/libcompose/project/options"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
"github.com/docker/libcompose/project/options"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -5,12 +5,12 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
machineUtil "github.com/docker/machine/utils" machineUtil "github.com/docker/machine/utils"
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/util"
) )
const ( const (

View File

@ -4,8 +4,9 @@ import (
"os" "os"
"os/exec" "os/exec"
"github.com/codegangsta/cli"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
) )
func udevSettleAction(c *cli.Context) { func udevSettleAction(c *cli.Context) {

View File

@ -5,21 +5,20 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path"
"path/filepath"
"syscall" "syscall"
"time" "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/config"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
rosDocker "github.com/rancher/os/pkg/docker" rosDocker "github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "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 ( const (

View File

@ -5,23 +5,21 @@ package init
import ( import (
"fmt" "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/config"
"github.com/rancher/os/pkg/dfs" "github.com/rancher/os/pkg/dfs"
"github.com/rancher/os/pkg/init/b2d" "github.com/rancher/os/pkg/init/b2d"
"github.com/rancher/os/pkg/init/cloudinit" "github.com/rancher/os/pkg/init/cloudinit"
"github.com/rancher/os/pkg/init/configfiles" "github.com/rancher/os/pkg/init/configfiles"
"github.com/rancher/os/pkg/init/debug" "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/env"
"github.com/rancher/os/pkg/init/fsmount" "github.com/rancher/os/pkg/init/fsmount"
"github.com/rancher/os/pkg/init/hypervisor" "github.com/rancher/os/pkg/init/hypervisor"
"github.com/rancher/os/pkg/init/modules" "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/prepare"
"github.com/rancher/os/pkg/init/recovery" "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/sharedroot"
"github.com/rancher/os/pkg/init/switchroot" "github.com/rancher/os/pkg/init/switchroot"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"

View File

@ -1,17 +1,16 @@
package network package network
import ( import (
"golang.org/x/net/context"
"github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log"
"io/ioutil" "io/ioutil"
"github.com/docker/libnetwork/resolvconf"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/hostname" "github.com/rancher/os/pkg/hostname"
"github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/netconf"
"github.com/docker/libnetwork/resolvconf"
"golang.org/x/net/context"
) )
func Main() { func Main() {

View File

@ -10,17 +10,16 @@ import (
"syscall" "syscall"
"time" "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"
"github.com/docker/engine-api/types/container" "github.com/docker/engine-api/types/container"
"github.com/docker/engine-api/types/filters" "github.com/docker/engine-api/types/filters"
"github.com/rancher/os/cmd/control/install" "golang.org/x/net/context"
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/util"
) )
// You can't shutdown the system from a process in console because we want to stop the console container. // You can't shutdown the system from a process in console because we want to stop the console container.

View File

@ -7,10 +7,11 @@ import (
"path/filepath" "path/filepath"
"syscall" "syscall"
"github.com/codegangsta/cli"
"github.com/rancher/os/cmd/control/install" "github.com/rancher/os/cmd/control/install"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
) )
var ( var (

View File

@ -13,9 +13,10 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/codegangsta/cli"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/codegangsta/cli"
) )
var ( var (

View File

@ -22,11 +22,11 @@ import (
"path" "path"
"syscall" "syscall"
"github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util"
"github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/mount"
"github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/pkg/util"
) )
const ( const (

View File

@ -5,10 +5,9 @@ import (
"log" "log"
"strings" "strings"
"github.com/rancher/os/pkg/netconf"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata"
"github.com/rancher/os/pkg/netconf"
) )
const ( const (

View File

@ -19,12 +19,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/rancher/os/pkg/netconf"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata"
"github.com/rancher/os/config/cloudinit/pkg" "github.com/rancher/os/config/cloudinit/pkg"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/netconf"
) )
const ( const (

View File

@ -17,14 +17,12 @@ package digitalocean
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"strconv"
"github.com/rancher/os/pkg/netconf"
"net" "net"
"strconv"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata"
"github.com/rancher/os/pkg/netconf"
) )
const ( const (

View File

@ -20,12 +20,11 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/rancher/os/pkg/netconf"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata"
"github.com/rancher/os/config/cloudinit/datasource/metadata/test" "github.com/rancher/os/config/cloudinit/datasource/metadata/test"
"github.com/rancher/os/config/cloudinit/pkg" "github.com/rancher/os/config/cloudinit/pkg"
"github.com/rancher/os/pkg/netconf"
) )
func TestType(t *testing.T) { func TestType(t *testing.T) {

View File

@ -20,11 +20,10 @@ import (
"net" "net"
"strings" "strings"
"github.com/rancher/os/pkg/netconf"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata"
"github.com/rancher/os/config/cloudinit/pkg" "github.com/rancher/os/config/cloudinit/pkg"
"github.com/rancher/os/pkg/netconf"
) )
const ( const (

View File

@ -21,8 +21,6 @@ import (
"strconv" "strconv"
"strings" "strings"
//"github.com/rancher/os/netconf"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata"
) )

View File

@ -20,8 +20,6 @@ import (
"reflect" "reflect"
"testing" "testing"
//"github.com/rancher/os/netconf"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/datasource/metadata" "github.com/rancher/os/config/cloudinit/datasource/metadata"
"github.com/rancher/os/config/cloudinit/datasource/metadata/test" "github.com/rancher/os/config/cloudinit/datasource/metadata/test"

View File

@ -20,10 +20,9 @@ import (
"io/ioutil" "io/ioutil"
"strings" "strings"
"github.com/rancher/os/pkg/log"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/config/cloudinit/pkg" "github.com/rancher/os/config/cloudinit/pkg"
"github.com/rancher/os/pkg/log"
) )
const ( const (

View File

@ -18,11 +18,10 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"github.com/rancher/os/config/cloudinit/pkg"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/rancher/os/config/cloudinit/pkg"
"github.com/sigma/vmw-guestinfo/rpcvmx" "github.com/sigma/vmw-guestinfo/rpcvmx"
"github.com/sigma/vmw-guestinfo/vmcheck" "github.com/sigma/vmw-guestinfo/vmcheck"
ovf "github.com/sigma/vmw-ovflib" ovf "github.com/sigma/vmw-ovflib"

View File

@ -22,9 +22,8 @@ import (
"os" "os"
"path" "path"
"github.com/rancher/os/pkg/log"
"github.com/rancher/os/config/cloudinit/datasource" "github.com/rancher/os/config/cloudinit/datasource"
"github.com/rancher/os/pkg/log"
) )
type Waagent struct { type Waagent struct {

View File

@ -4,8 +4,9 @@ import (
"io/ioutil" "io/ioutil"
"strings" "strings"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
) )
func Read(parseAll bool) (m map[interface{}]interface{}, err error) { func Read(parseAll bool) (m map[interface{}]interface{}, err error) {

View File

@ -3,10 +3,10 @@ package config
import ( import (
"testing" "testing"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/rancher/os/config/cmdline" "github.com/rancher/os/config/cmdline"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View File

@ -9,14 +9,15 @@ import (
"sort" "sort"
"strings" "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/datasource"
"github.com/rancher/os/config/cloudinit/initialize" "github.com/rancher/os/config/cloudinit/initialize"
"github.com/rancher/os/config/cmdline" "github.com/rancher/os/config/cmdline"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util" "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) { func ReadConfig(bytes []byte, substituteMetadataVars bool, files ...string) (*CloudConfig, error) {

View File

@ -4,11 +4,12 @@ import (
"fmt" "fmt"
"runtime" "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/cloudinit/config"
"github.com/rancher/os/config/yaml" "github.com/rancher/os/config/yaml"
"github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/netconf"
"github.com/docker/engine-api/types"
composeConfig "github.com/docker/libcompose/config"
) )
const ( const (

View File

@ -5,8 +5,9 @@ import (
"strings" "strings"
"testing" "testing"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
) )
func testValidate(t *testing.T, cfg []byte, contains string) { func testValidate(t *testing.T, cfg []byte, contains string) {

View File

@ -4,8 +4,6 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/docker/docker/docker"
"github.com/docker/docker/pkg/reexec"
"github.com/rancher/os/cmd/cloudinitexecute" "github.com/rancher/os/cmd/cloudinitexecute"
"github.com/rancher/os/cmd/cloudinitsave" "github.com/rancher/os/cmd/cloudinitsave"
"github.com/rancher/os/cmd/control" "github.com/rancher/os/cmd/control"
@ -16,6 +14,9 @@ import (
"github.com/rancher/os/cmd/sysinit" "github.com/rancher/os/cmd/sysinit"
"github.com/rancher/os/cmd/wait" "github.com/rancher/os/cmd/wait"
"github.com/rancher/os/pkg/dfs" "github.com/rancher/os/pkg/dfs"
"github.com/docker/docker/docker"
"github.com/docker/docker/pkg/reexec"
) )
var entrypoints = map[string]func(){ var entrypoints = map[string]func(){

View File

@ -5,7 +5,11 @@ import (
"io/ioutil" "io/ioutil"
"os" "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" yaml "github.com/cloudfoundry-incubator/candiedyaml"
dockerClient "github.com/docker/engine-api/client" dockerClient "github.com/docker/engine-api/client"
@ -13,15 +17,10 @@ import (
composeConfig "github.com/docker/libcompose/config" composeConfig "github.com/docker/libcompose/config"
"github.com/docker/libcompose/docker" "github.com/docker/libcompose/docker"
composeClient "github.com/docker/libcompose/docker/client" composeClient "github.com/docker/libcompose/docker/client"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/docker/libcompose/project/events" "github.com/docker/libcompose/project/events"
"github.com/docker/libcompose/project/options" "github.com/docker/libcompose/project/options"
"github.com/rancher/os/config" "golang.org/x/net/context"
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"
) )
func CreateService(cfg *config.CloudConfig, name string, serviceConfig *composeConfig.ServiceConfigV1) (project.Service, error) { func CreateService(cfg *config.CloudConfig, name string, serviceConfig *composeConfig.ServiceConfigV1) (project.Service, error) {

View File

@ -3,13 +3,14 @@ package compose
import ( import (
"fmt" "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/config"
"github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util/network" "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 { func LoadService(p *project.Project, cfg *config.CloudConfig, useNetwork bool, service string) error {

View File

@ -12,12 +12,12 @@ import (
"syscall" "syscall"
"github.com/rancher/os/pkg/init/one" "github.com/rancher/os/pkg/init/one"
"github.com/docker/libnetwork/resolvconf"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/netconf"
"github.com/rancher/os/pkg/selinux" "github.com/rancher/os/pkg/selinux"
"github.com/rancher/os/pkg/util" "github.com/rancher/os/pkg/util"
"github.com/docker/libnetwork/resolvconf"
) )
const ( const (

View File

@ -5,11 +5,12 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/log"
"github.com/docker/docker/registry" "github.com/docker/docker/registry"
"github.com/docker/engine-api/types" "github.com/docker/engine-api/types"
"github.com/docker/libcompose/docker" "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 // ConfigAuthLookup will lookup registry auth info from cloud config

View File

@ -1,8 +1,9 @@
package docker package docker
import ( import (
dockerClient "github.com/docker/engine-api/client"
"github.com/rancher/os/config" "github.com/rancher/os/config"
dockerClient "github.com/docker/engine-api/client"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -4,14 +4,14 @@ import (
"fmt" "fmt"
"sync" "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" dockerclient "github.com/docker/engine-api/client"
composeClient "github.com/docker/libcompose/docker/client" composeClient "github.com/docker/libcompose/docker/client"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/rancher/os/config" "golang.org/x/net/context"
"github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/util"
) )
type ClientFactory struct { type ClientFactory struct {

View File

@ -4,9 +4,10 @@ import (
"fmt" "fmt"
"strings" "strings"
composeConfig "github.com/docker/libcompose/config"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
composeConfig "github.com/docker/libcompose/config"
) )
type ConfigEnvironment struct { type ConfigEnvironment struct {

View File

@ -3,14 +3,15 @@ package docker
import ( import (
"fmt" "fmt"
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/log"
dockerclient "github.com/docker/engine-api/client" dockerclient "github.com/docker/engine-api/client"
"github.com/docker/engine-api/types" "github.com/docker/engine-api/types"
composeConfig "github.com/docker/libcompose/config" composeConfig "github.com/docker/libcompose/config"
"github.com/docker/libcompose/docker" "github.com/docker/libcompose/docker"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/docker/libcompose/project/options" "github.com/docker/libcompose/project/options"
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/log"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -1,10 +1,11 @@
package docker package docker
import ( import (
"github.com/rancher/os/pkg/util"
composeConfig "github.com/docker/libcompose/config" composeConfig "github.com/docker/libcompose/config"
"github.com/docker/libcompose/docker" "github.com/docker/libcompose/docker"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/rancher/os/pkg/util"
) )
type ServiceFactory struct { type ServiceFactory struct {

View File

@ -1,8 +1,9 @@
package docker package docker
import ( import (
composeConfig "github.com/docker/libcompose/config"
"github.com/rancher/os/config" "github.com/rancher/os/config"
composeConfig "github.com/docker/libcompose/config"
) )
func IsSystemContainer(serviceConfig *composeConfig.ServiceConfig) bool { func IsSystemContainer(serviceConfig *composeConfig.ServiceConfig) bool {

View File

@ -1,14 +1,15 @@
package recovery package recovery
import ( import (
composeConfig "github.com/docker/libcompose/config"
"github.com/docker/libcompose/yaml"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
"github.com/rancher/os/pkg/init/docker" "github.com/rancher/os/pkg/init/docker"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/rancher/os/pkg/netconf" "github.com/rancher/os/pkg/netconf"
"github.com/rancher/os/pkg/sysinit" "github.com/rancher/os/pkg/sysinit"
composeConfig "github.com/docker/libcompose/config"
"github.com/docker/libcompose/yaml"
) )
var ( var (

View File

@ -3,9 +3,10 @@ package sharedroot
import ( import (
"os" "os"
"github.com/docker/docker/pkg/mount"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/init/fsmount" "github.com/rancher/os/pkg/init/fsmount"
"github.com/docker/docker/pkg/mount"
) )
func Setup(c *config.CloudConfig) (*config.CloudConfig, error) { func Setup(c *config.CloudConfig) (*config.CloudConfig, error) {

View File

@ -8,11 +8,12 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/docker/docker/pkg/archive"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/dfs" "github.com/rancher/os/pkg/dfs"
"github.com/rancher/os/pkg/init/fsmount" "github.com/rancher/os/pkg/init/fsmount"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/docker/docker/pkg/archive"
) )
func SwitchRoot(cfg *config.CloudConfig) (*config.CloudConfig, error) { func SwitchRoot(cfg *config.CloudConfig) (*config.CloudConfig, error) {

View File

@ -8,10 +8,10 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/rancher/os/config/cmdline"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
lsyslog "github.com/Sirupsen/logrus/hooks/syslog" lsyslog "github.com/Sirupsen/logrus/hooks/syslog"
"github.com/rancher/os/config/cmdline"
) )
var logFile *os.File var logFile *os.File

View File

@ -8,6 +8,7 @@ import (
"time" "time"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/vishvananda/netlink" "github.com/vishvananda/netlink"
) )

View File

@ -11,9 +11,9 @@ import (
"sync" "sync"
"syscall" "syscall"
shlex "github.com/flynn/go-shlex"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
shlex "github.com/flynn/go-shlex"
glob "github.com/ryanuber/go-glob" glob "github.com/ryanuber/go-glob"
"github.com/vishvananda/netlink" "github.com/vishvananda/netlink"
) )

View File

@ -7,13 +7,14 @@ import (
"path/filepath" "path/filepath"
"syscall" "syscall"
"github.com/docker/engine-api/types"
"github.com/docker/libcompose/project/options"
"github.com/rancher/os/cmd/control" "github.com/rancher/os/cmd/control"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/compose" "github.com/rancher/os/pkg/compose"
"github.com/rancher/os/pkg/docker" "github.com/rancher/os/pkg/docker"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
"github.com/docker/engine-api/types"
"github.com/docker/libcompose/project/options"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -8,11 +8,11 @@ import (
"os" "os"
"strings" "strings"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
composeConfig "github.com/docker/libcompose/config"
"github.com/rancher/os/config" "github.com/rancher/os/config"
"github.com/rancher/os/pkg/log" "github.com/rancher/os/pkg/log"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
composeConfig "github.com/docker/libcompose/config"
) )
var ( var (

View File

@ -12,8 +12,9 @@ import (
"path" "path"
"strings" "strings"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
osYaml "github.com/rancher/os/config/yaml" osYaml "github.com/rancher/os/config/yaml"
yaml "github.com/cloudfoundry-incubator/candiedyaml"
) )
const ( const (