Browse code

Fix some typos in comments and strings

Most of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

Stefan Weil authored on 2016/02/23 04:22:20
Showing 15 changed files
... ...
@@ -1771,7 +1771,7 @@ With the ongoing changes to the networking and execution subsystems of docker te
1771 1771
 + Containers can expose public UDP ports (eg, '-p 123/udp')
1772 1772
 + Optionally specify an exact public port (eg. '-p 80:4500')
1773 1773
 * 'docker login' supports additional options
1774
-- Dont save a container`s hostname when committing an image.
1774
+- Don't save a container`s hostname when committing an image.
1775 1775
 
1776 1776
 #### Registry
1777 1777
 
... ...
@@ -71,7 +71,7 @@ func parseWords(rest string) []string {
71 71
 			if unicode.IsSpace(ch) { // skip spaces
72 72
 				continue
73 73
 			}
74
-			phase = inWord // found it, fall thru
74
+			phase = inWord // found it, fall through
75 75
 		}
76 76
 		if (phase == inWord || phase == inQuote) && (pos == len(rest)) {
77 77
 			if blankOK || len(word) > 0 {
... ...
@@ -118,7 +118,7 @@ func extractBuilderFlags(line string) (string, []string, error) {
118 118
 				return line[pos:], words, nil
119 119
 			}
120 120
 
121
-			phase = inWord // found someting with "--", fall thru
121
+			phase = inWord // found someting with "--", fall through
122 122
 		}
123 123
 		if (phase == inWord || phase == inQuote) && (pos == len(line)) {
124 124
 			if word != "--" && (blankOK || len(word) > 0) {
... ...
@@ -142,7 +142,7 @@ func TestNetworkOptions(t *testing.T) {
142 142
 	}
143 143
 
144 144
 	if _, err := daemon.networkOptions(dconfigCorrect); err != nil {
145
-		t.Fatalf("Expect networkOptions sucess, got error: %v", err)
145
+		t.Fatalf("Expect networkOptions success, got error: %v", err)
146 146
 	}
147 147
 
148 148
 	dconfigWrong := &Config{
... ...
@@ -573,7 +573,7 @@ func determineDefaultFS() string {
573 573
 		return "xfs"
574 574
 	}
575 575
 
576
-	logrus.Warn("devmapper: XFS is not supported in your system. Either the kernel doesnt support it or mkfs.xfs is not in your PATH. Defaulting to ext4 filesystem")
576
+	logrus.Warn("devmapper: XFS is not supported in your system. Either the kernel doesn't support it or mkfs.xfs is not in your PATH. Defaulting to ext4 filesystem")
577 577
 	return "ext4"
578 578
 }
579 579
 
... ...
@@ -26,7 +26,7 @@ group.
26 26
 
27 27
 To connect to the Docker daemon with cURL you need to use cURL 7.40 or
28 28
 later, as these versions have the `--unix-socket` flag available. To
29
-run `curl` against the deamon on the default socket, use the
29
+run `curl` against the daemon on the default socket, use the
30 30
 following:
31 31
 
32 32
     curl --unix-socket /var/run/docker.sock http://containers/json
... ...
@@ -5,7 +5,7 @@ VERSION = $(shell cat VERSION)
5 5
 override_dh_gencontrol:
6 6
 	# if we're on Ubuntu, we need to Recommends: apparmor
7 7
 	echo 'apparmor:Recommends=$(shell dpkg-vendor --is Ubuntu && echo apparmor)' >> debian/docker-engine.substvars
8
-	# if we are building experimental we reccomend yubico-piv-tool
8
+	# if we are building experimental we recommend yubico-piv-tool
9 9
 	echo 'yubico:Recommends=$(shell [ "$DOCKER_EXPERIMENTAL" ] && echo "yubico-piv-tool (>= 1.1.0~)")' >> debian/docker-engine.substvars
10 10
 	dh_gencontrol
11 11
 
... ...
@@ -97,7 +97,7 @@ func MakeConfigFromV1Config(imageJSON []byte, rootfs *image.RootFS, history []im
97 97
 
98 98
 	delete(c, "id")
99 99
 	delete(c, "parent")
100
-	delete(c, "Size") // Size is calculated from data on disk and is inconsitent
100
+	delete(c, "Size") // Size is calculated from data on disk and is inconsistent
101 101
 	delete(c, "parent_id")
102 102
 	delete(c, "layer_id")
103 103
 	delete(c, "throwaway")
... ...
@@ -438,7 +438,7 @@ func (s *DockerSuite) TestGetStoppedContainerStats(c *check.C) {
438 438
 		c.Assert(r.err, checker.IsNil)
439 439
 		c.Assert(r.status, checker.Equals, http.StatusOK)
440 440
 	case <-time.After(10 * time.Second):
441
-		c.Fatal("timeout waiting for stats reponse for stopped container")
441
+		c.Fatal("timeout waiting for stats response for stopped container")
442 442
 	}
443 443
 }
444 444
 
... ...
@@ -2029,10 +2029,10 @@ func (s *DockerSuite) TestRunInspectMacAddress(c *check.C) {
2029 2029
 	}
2030 2030
 }
2031 2031
 
2032
-// test docker run use a invalid mac address
2032
+// test docker run use an invalid mac address
2033 2033
 func (s *DockerSuite) TestRunWithInvalidMacAddress(c *check.C) {
2034 2034
 	out, _, err := dockerCmdWithError("run", "--mac-address", "92:d0:c6:0a:29", "busybox")
2035
-	//use a invalid mac address should with a error out
2035
+	//use an invalid mac address should with an error out
2036 2036
 	if err == nil || !strings.Contains(out, "is not a valid mac address") {
2037 2037
 		c.Fatalf("run with an invalid --mac-address should with error out")
2038 2038
 	}
... ...
@@ -2918,7 +2918,7 @@ func (s *DockerSuite) TestRunReadProcLatency(c *check.C) {
2918 2918
 	// some kernels don't have this configured so skip the test if this file is not found
2919 2919
 	// on the host running the tests.
2920 2920
 	if _, err := os.Stat("/proc/latency_stats"); err != nil {
2921
-		c.Skip("kernel doesnt have latency_stats configured")
2921
+		c.Skip("kernel doesn't have latency_stats configured")
2922 2922
 		return
2923 2923
 	}
2924 2924
 	out, code, err := dockerCmdWithError("run", "busybox", "cat", "/proc/latency_stats")
... ...
@@ -42,9 +42,9 @@ logging drivers.
42 42
 **--tail**="*all*"
43 43
    Output the specified number of lines at the end of logs (defaults to all logs)
44 44
 
45
-The `--since` option can be Unix timestamps, date formated timestamps, or Go
45
+The `--since` option can be Unix timestamps, date formatted timestamps, or Go
46 46
 duration strings (e.g. `10m`, `1h30m`) computed relative to the client machine’s
47
-time. Supported formats for date formated time stamps include RFC3339Nano,
47
+time. Supported formats for date formatted time stamps include RFC3339Nano,
48 48
 RFC3339, `2006-01-02T15:04:05`, `2006-01-02T15:04:05.999999999`,
49 49
 `2006-01-02Z07:00`, and `2006-01-02`. The local timezone on the client will be
50 50
 used if you do not provide either a `Z` or a `+-00:00` timezone offset at the
... ...
@@ -148,7 +148,7 @@ func (rm *responseModifier) Hijack() (net.Conn, *bufio.ReadWriter, error) {
148 148
 
149 149
 	hijacker, ok := rm.rw.(http.Hijacker)
150 150
 	if !ok {
151
-		return nil, nil, fmt.Errorf("Internal reponse writer doesn't support the Hijacker interface")
151
+		return nil, nil, fmt.Errorf("Internal response writer doesn't support the Hijacker interface")
152 152
 	}
153 153
 	return hijacker.Hijack()
154 154
 }
... ...
@@ -157,7 +157,7 @@ func (rm *responseModifier) Hijack() (net.Conn, *bufio.ReadWriter, error) {
157 157
 func (rm *responseModifier) CloseNotify() <-chan bool {
158 158
 	closeNotifier, ok := rm.rw.(http.CloseNotifier)
159 159
 	if !ok {
160
-		logrus.Errorf("Internal reponse writer doesn't support the CloseNotifier interface")
160
+		logrus.Errorf("Internal response writer doesn't support the CloseNotifier interface")
161 161
 		return nil
162 162
 	}
163 163
 	return closeNotifier.CloseNotify()
... ...
@@ -167,7 +167,7 @@ func (rm *responseModifier) CloseNotify() <-chan bool {
167 167
 func (rm *responseModifier) Flush() {
168 168
 	flusher, ok := rm.rw.(http.Flusher)
169 169
 	if !ok {
170
-		logrus.Errorf("Internal reponse writer doesn't support the Flusher interface")
170
+		logrus.Errorf("Internal response writer doesn't support the Flusher interface")
171 171
 		return
172 172
 	}
173 173
 
... ...
@@ -96,7 +96,7 @@ type errorReaderCloser struct{}
96 96
 func (errorReaderCloser) Close() error { return nil }
97 97
 
98 98
 func (errorReaderCloser) Read(p []byte) (n int, err error) {
99
-	return 0, fmt.Errorf("A error occured")
99
+	return 0, fmt.Errorf("An error occurred")
100 100
 }
101 101
 
102 102
 // If a an unknown error is encountered, return 0, nil and log it
... ...
@@ -11,7 +11,7 @@ type statusError struct {
11 11
 	err    string
12 12
 }
13 13
 
14
-// Error returns a formated string for this error type
14
+// Error returns a formatted string for this error type
15 15
 func (e *statusError) Error() string {
16 16
 	return fmt.Sprintf("%s: %v", e.method, e.err)
17 17
 }
... ...
@@ -72,7 +72,7 @@ func TestWriteWithWriterError(t *testing.T) {
72 72
 		t.Fatalf("Didn't get expected error.")
73 73
 	}
74 74
 	if n != expectedReturnedBytes {
75
-		t.Fatalf("Didn't get expected writen bytes %d, got %d.",
75
+		t.Fatalf("Didn't get expected written bytes %d, got %d.",
76 76
 			expectedReturnedBytes, n)
77 77
 	}
78 78
 }