From 94b1cf4be3606ff731b3ca012e5eddf021f4608f Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Tue, 29 Jan 2013 13:50:27 -0800 Subject: [PATCH] go fmt --- container.go | 14 +++++++------- docker.go | 2 -- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/container.go b/container.go index a4118f026f..68473541ee 100644 --- a/container.go +++ b/container.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "errors" + "github.com/kr/pty" "io" "io/ioutil" "log" @@ -13,7 +14,6 @@ import ( "strings" "syscall" "time" - "github.com/kr/pty" ) type Container struct { @@ -41,10 +41,10 @@ type Container struct { } type Config struct { - Hostname string - Ram int64 - Tty bool // Attach standard streams to a tty, including stdin if it is not closed. - OpenStdin bool // Open stdin + Hostname string + Ram int64 + Tty bool // Attach standard streams to a tty, including stdin if it is not closed. + OpenStdin bool // Open stdin } func createContainer(id string, root string, command string, args []string, layers []string, config *Config) (*Container, error) { @@ -67,7 +67,7 @@ func createContainer(id string, root string, command string, args []string, laye if container.Config.OpenStdin { container.stdin, container.stdinPipe = io.Pipe() } else { - container.stdinPipe = NopWriteCloser(ioutil.Discard) // Silently drop stdin + container.stdinPipe = NopWriteCloser(ioutil.Discard) // Silently drop stdin } container.stdout.AddWriter(NopWriteCloser(container.stdoutLog)) container.stderr.AddWriter(NopWriteCloser(container.stderrLog)) @@ -107,7 +107,7 @@ func loadContainer(containerPath string) (*Container, error) { if container.Config.OpenStdin { container.stdin, container.stdinPipe = io.Pipe() } else { - container.stdinPipe = NopWriteCloser(ioutil.Discard) // Silently drop stdin + container.stdinPipe = NopWriteCloser(ioutil.Discard) // Silently drop stdin } container.State = newState() return container, nil diff --git a/docker.go b/docker.go index d55d892a5b..2b334976d7 100644 --- a/docker.go +++ b/docker.go @@ -117,7 +117,6 @@ func NewFromDirectory(root string) (*Docker, error) { return docker, nil } - type History []*Container func (history *History) Len() int { @@ -140,4 +139,3 @@ func (history *History) Add(container *Container) { *history = append(*history, container) sort.Sort(history) } -