Pārlūkot izejas kodu

gofmt -s -w

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Victor Vieux 11 gadi atpakaļ
vecāks
revīzija
5a0ef08c94

+ 2 - 2
daemon/container.go

@@ -15,8 +15,6 @@ import (
 	"syscall"
 	"syscall"
 	"time"
 	"time"
 
 
-	"github.com/docker/libcontainer/devices"
-	"github.com/docker/libcontainer/label"
 	"github.com/docker/docker/archive"
 	"github.com/docker/docker/archive"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
@@ -30,6 +28,8 @@ import (
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils/broadcastwriter"
 	"github.com/docker/docker/utils/broadcastwriter"
+	"github.com/docker/libcontainer/devices"
+	"github.com/docker/libcontainer/label"
 )
 )
 
 
 const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

+ 1 - 1
daemon/daemon.go

@@ -12,7 +12,6 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
-	"github.com/docker/libcontainer/label"
 	"github.com/docker/docker/archive"
 	"github.com/docker/docker/archive"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver/execdrivers"
 	"github.com/docker/docker/daemon/execdriver/execdrivers"
@@ -34,6 +33,7 @@ import (
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils/broadcastwriter"
 	"github.com/docker/docker/utils/broadcastwriter"
+	"github.com/docker/libcontainer/label"
 )
 )
 
 
 // Set the max depth to the aufs default that most
 // Set the max depth to the aufs default that most

+ 3 - 3
daemon/execdriver/lxc/driver.go

@@ -16,12 +16,12 @@ import (
 	"syscall"
 	"syscall"
 	"time"
 	"time"
 
 
-	"github.com/docker/libcontainer/cgroups"
-	"github.com/docker/libcontainer/label"
-	"github.com/docker/libcontainer/mount/nodes"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/pkg/term"
 	"github.com/docker/docker/pkg/term"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
+	"github.com/docker/libcontainer/cgroups"
+	"github.com/docker/libcontainer/label"
+	"github.com/docker/libcontainer/mount/nodes"
 	"github.com/kr/pty"
 	"github.com/kr/pty"
 )
 )
 
 

+ 1 - 1
daemon/execdriver/lxc/init.go

@@ -9,8 +9,8 @@ import (
 	"strings"
 	"strings"
 	"syscall"
 	"syscall"
 
 
-	"github.com/docker/libcontainer/netlink"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
+	"github.com/docker/libcontainer/netlink"
 )
 )
 
 
 // Clear environment pollution introduced by lxc-start
 // Clear environment pollution introduced by lxc-start

+ 3 - 3
daemon/execdriver/lxc/lxc_init_linux.go

@@ -7,12 +7,12 @@ import (
 	"strings"
 	"strings"
 	"syscall"
 	"syscall"
 
 
-	"github.com/docker/libcontainer/namespaces"
-	"github.com/docker/libcontainer/security/capabilities"
-	"github.com/docker/libcontainer/utils"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver/native/template"
 	"github.com/docker/docker/daemon/execdriver/native/template"
 	"github.com/docker/docker/pkg/system"
 	"github.com/docker/docker/pkg/system"
+	"github.com/docker/libcontainer/namespaces"
+	"github.com/docker/libcontainer/security/capabilities"
+	"github.com/docker/libcontainer/utils"
 )
 )
 
 
 func setHostname(hostname string) error {
 func setHostname(hostname string) error {

+ 1 - 1
daemon/execdriver/lxc/lxc_template.go

@@ -4,8 +4,8 @@ import (
 	"strings"
 	"strings"
 	"text/template"
 	"text/template"
 
 
-	"github.com/docker/libcontainer/label"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
+	"github.com/docker/libcontainer/label"
 )
 )
 
 
 const LxcTemplate = `
 const LxcTemplate = `

+ 1 - 1
daemon/execdriver/lxc/lxc_template_unit_test.go

@@ -13,8 +13,8 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
-	"github.com/docker/libcontainer/devices"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
+	"github.com/docker/libcontainer/devices"
 )
 )
 
 
 func TestLXCConfig(t *testing.T) {
 func TestLXCConfig(t *testing.T) {

+ 1 - 1
daemon/execdriver/native/configuration/parse.go

@@ -7,8 +7,8 @@ import (
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 
 
-	"github.com/docker/libcontainer"
 	"github.com/docker/docker/pkg/units"
 	"github.com/docker/docker/pkg/units"
+	"github.com/docker/libcontainer"
 )
 )
 
 
 type Action func(*libcontainer.Config, interface{}, string) error
 type Action func(*libcontainer.Config, interface{}, string) error

+ 1 - 1
daemon/execdriver/native/configuration/parse_test.go

@@ -3,8 +3,8 @@ package configuration
 import (
 import (
 	"testing"
 	"testing"
 
 
-	"github.com/docker/libcontainer/security/capabilities"
 	"github.com/docker/docker/daemon/execdriver/native/template"
 	"github.com/docker/docker/daemon/execdriver/native/template"
+	"github.com/docker/libcontainer/security/capabilities"
 )
 )
 
 
 // Checks whether the expected capability is specified in the capabilities.
 // Checks whether the expected capability is specified in the capabilities.

+ 3 - 3
daemon/execdriver/native/create.go

@@ -8,14 +8,14 @@ import (
 	"os/exec"
 	"os/exec"
 	"path/filepath"
 	"path/filepath"
 
 
+	"github.com/docker/docker/daemon/execdriver"
+	"github.com/docker/docker/daemon/execdriver/native/configuration"
+	"github.com/docker/docker/daemon/execdriver/native/template"
 	"github.com/docker/libcontainer"
 	"github.com/docker/libcontainer"
 	"github.com/docker/libcontainer/apparmor"
 	"github.com/docker/libcontainer/apparmor"
 	"github.com/docker/libcontainer/devices"
 	"github.com/docker/libcontainer/devices"
 	"github.com/docker/libcontainer/mount"
 	"github.com/docker/libcontainer/mount"
 	"github.com/docker/libcontainer/security/capabilities"
 	"github.com/docker/libcontainer/security/capabilities"
-	"github.com/docker/docker/daemon/execdriver"
-	"github.com/docker/docker/daemon/execdriver/native/configuration"
-	"github.com/docker/docker/daemon/execdriver/native/template"
 )
 )
 
 
 // createContainer populates and configures the container type with the
 // createContainer populates and configures the container type with the

+ 3 - 3
daemon/execdriver/native/driver.go

@@ -14,15 +14,15 @@ import (
 	"sync"
 	"sync"
 	"syscall"
 	"syscall"
 
 
+	"github.com/docker/docker/daemon/execdriver"
+	"github.com/docker/docker/pkg/system"
+	"github.com/docker/docker/pkg/term"
 	"github.com/docker/libcontainer"
 	"github.com/docker/libcontainer"
 	"github.com/docker/libcontainer/apparmor"
 	"github.com/docker/libcontainer/apparmor"
 	"github.com/docker/libcontainer/cgroups/fs"
 	"github.com/docker/libcontainer/cgroups/fs"
 	"github.com/docker/libcontainer/cgroups/systemd"
 	"github.com/docker/libcontainer/cgroups/systemd"
 	"github.com/docker/libcontainer/namespaces"
 	"github.com/docker/libcontainer/namespaces"
 	"github.com/docker/libcontainer/syncpipe"
 	"github.com/docker/libcontainer/syncpipe"
-	"github.com/docker/docker/daemon/execdriver"
-	"github.com/docker/docker/pkg/system"
-	"github.com/docker/docker/pkg/term"
 )
 )
 
 
 const (
 const (

+ 1 - 1
daemon/execdriver/utils.go

@@ -4,8 +4,8 @@ import (
 	"fmt"
 	"fmt"
 	"strings"
 	"strings"
 
 
-	"github.com/docker/libcontainer/security/capabilities"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
+	"github.com/docker/libcontainer/security/capabilities"
 )
 )
 
 
 func TweakCapabilities(basics, adds, drops []string) ([]string, error) {
 func TweakCapabilities(basics, adds, drops []string) ([]string, error) {

+ 1 - 1
daemon/graphdriver/aufs/aufs.go

@@ -30,11 +30,11 @@ import (
 	"sync"
 	"sync"
 	"syscall"
 	"syscall"
 
 
-	"github.com/docker/libcontainer/label"
 	"github.com/docker/docker/archive"
 	"github.com/docker/docker/archive"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
 	mountpk "github.com/docker/docker/pkg/mount"
 	mountpk "github.com/docker/docker/pkg/mount"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
+	"github.com/docker/libcontainer/label"
 )
 )
 
 
 var (
 var (

+ 1 - 1
daemon/graphdriver/devmapper/deviceset.go

@@ -18,10 +18,10 @@ import (
 	"syscall"
 	"syscall"
 	"time"
 	"time"
 
 
-	"github.com/docker/libcontainer/label"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/pkg/units"
 	"github.com/docker/docker/pkg/units"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
+	"github.com/docker/libcontainer/label"
 )
 )
 
 
 var (
 var (

+ 1 - 1
daemon/networkdriver/bridge/driver.go

@@ -8,7 +8,6 @@ import (
 	"strings"
 	"strings"
 	"sync"
 	"sync"
 
 
-	"github.com/docker/libcontainer/netlink"
 	"github.com/docker/docker/daemon/networkdriver"
 	"github.com/docker/docker/daemon/networkdriver"
 	"github.com/docker/docker/daemon/networkdriver/ipallocator"
 	"github.com/docker/docker/daemon/networkdriver/ipallocator"
 	"github.com/docker/docker/daemon/networkdriver/portallocator"
 	"github.com/docker/docker/daemon/networkdriver/portallocator"
@@ -17,6 +16,7 @@ import (
 	"github.com/docker/docker/pkg/iptables"
 	"github.com/docker/docker/pkg/iptables"
 	"github.com/docker/docker/pkg/networkfs/resolvconf"
 	"github.com/docker/docker/pkg/networkfs/resolvconf"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
+	"github.com/docker/libcontainer/netlink"
 )
 )
 
 
 const (
 const (