1
0
mirror of https://github.com/rancher/os.git synced 2025-08-01 15:08:47 +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/log"
"github.com/rancher/os/pkg/util"
"golang.org/x/net/context"
)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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