Browse code

go fmt

Andrea Luzzardi authored on 2013/01/30 06:50:27
Showing 2 changed files
... ...
@@ -4,6 +4,7 @@ import (
4 4
 	"bytes"
5 5
 	"encoding/json"
6 6
 	"errors"
7
+	"github.com/kr/pty"
7 8
 	"io"
8 9
 	"io/ioutil"
9 10
 	"log"
... ...
@@ -13,7 +14,6 @@ import (
13 13
 	"strings"
14 14
 	"syscall"
15 15
 	"time"
16
-	"github.com/kr/pty"
17 16
 )
18 17
 
19 18
 type Container struct {
... ...
@@ -41,10 +41,10 @@ type Container struct {
41 41
 }
42 42
 
43 43
 type Config struct {
44
-	Hostname string
45
-	Ram      int64
46
-	Tty	 bool		// Attach standard streams to a tty, including stdin if it is not closed.
47
-	OpenStdin	bool	// Open stdin
44
+	Hostname  string
45
+	Ram       int64
46
+	Tty       bool // Attach standard streams to a tty, including stdin if it is not closed.
47
+	OpenStdin bool // Open stdin
48 48
 }
49 49
 
50 50
 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
67 67
 	if container.Config.OpenStdin {
68 68
 		container.stdin, container.stdinPipe = io.Pipe()
69 69
 	} else {
70
-		container.stdinPipe = NopWriteCloser(ioutil.Discard)	// Silently drop stdin
70
+		container.stdinPipe = NopWriteCloser(ioutil.Discard) // Silently drop stdin
71 71
 	}
72 72
 	container.stdout.AddWriter(NopWriteCloser(container.stdoutLog))
73 73
 	container.stderr.AddWriter(NopWriteCloser(container.stderrLog))
... ...
@@ -107,7 +107,7 @@ func loadContainer(containerPath string) (*Container, error) {
107 107
 	if container.Config.OpenStdin {
108 108
 		container.stdin, container.stdinPipe = io.Pipe()
109 109
 	} else {
110
-		container.stdinPipe = NopWriteCloser(ioutil.Discard)	// Silently drop stdin
110
+		container.stdinPipe = NopWriteCloser(ioutil.Discard) // Silently drop stdin
111 111
 	}
112 112
 	container.State = newState()
113 113
 	return container, nil
... ...
@@ -117,7 +117,6 @@ func NewFromDirectory(root string) (*Docker, error) {
117 117
 	return docker, nil
118 118
 }
119 119
 
120
-
121 120
 type History []*Container
122 121
 
123 122
 func (history *History) Len() int {
... ...
@@ -140,4 +139,3 @@ func (history *History) Add(container *Container) {
140 140
 	*history = append(*history, container)
141 141
 	sort.Sort(history)
142 142
 }
143
-