Browse code

fix typos

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud authored on 2016/05/08 10:36:10
Showing 61 changed files
... ...
@@ -1721,7 +1721,7 @@ With the ongoing changes to the networking and execution subsystems of docker te
1721 1721
 + Add -rm to docker run for removing a container on exit
1722 1722
 - Remove error messages which are not actually errors
1723 1723
 - Fix `docker rm` with volumes
1724
-- Fix some error cases where a HTTP body might not be closed
1724
+- Fix some error cases where an HTTP body might not be closed
1725 1725
 - Fix panic with wrong dockercfg file
1726 1726
 - Fix the attach behavior with -i
1727 1727
 * Record termination time in state.
... ...
@@ -121,7 +121,7 @@ However, there might be a way to implement that feature *on top of* Docker.
121 121
     <td>
122 122
       The <a href="https://groups.google.com/forum/#!forum/docker-dev" target="_blank">docker-dev</a>
123 123
       group is for contributors and other people contributing to the Docker project.
124
-      You can join them without an google account by sending an email to 
124
+      You can join them without a google account by sending an email to 
125 125
       <a href="mailto:docker-dev+subscribe@googlegroups.com">docker-dev+subscribe@googlegroups.com</a>.
126 126
       After receiving the join-request message, you can simply reply to that to confirm the subscribtion.
127 127
     </td>
... ...
@@ -117,7 +117,7 @@ func (scs simpleCredentialStore) SetRefreshToken(*url.URL, string, string) {
117 117
 
118 118
 // getNotaryRepository returns a NotaryRepository which stores all the
119 119
 // information needed to operate on a notary repository.
120
-// It creates a HTTP transport providing authentication support.
120
+// It creates an HTTP transport providing authentication support.
121 121
 func (cli *DockerCli) getNotaryRepository(repoInfo *registry.RepositoryInfo, authConfig types.AuthConfig, actions ...string) (*client.NotaryRepository, error) {
122 122
 	server, err := trustServer(repoInfo.Index)
123 123
 	if err != nil {
... ...
@@ -19,7 +19,7 @@ const APIVersionKey = "api-version"
19 19
 const UAStringKey = "upstream-user-agent"
20 20
 
21 21
 // APIFunc is an adapter to allow the use of ordinary functions as Docker API endpoints.
22
-// Any function that has the appropriate signature can be registered as a API endpoint (e.g. getVersion).
22
+// Any function that has the appropriate signature can be registered as an API endpoint (e.g. getVersion).
23 23
 type APIFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error
24 24
 
25 25
 // HijackConnection interrupts the http response writer to get the
... ...
@@ -123,7 +123,7 @@ func init() {
123 123
 	drivers = make(map[string]InitFunc)
124 124
 }
125 125
 
126
-// Register registers a InitFunc for the driver.
126
+// Register registers an InitFunc for the driver.
127 127
 func Register(name string, initFunc InitFunc) error {
128 128
 	if _, exists := drivers[name]; exists {
129 129
 		return fmt.Errorf("Name already registered %s", name)
... ...
@@ -94,7 +94,7 @@ func cleanup(t *testing.T, d *Driver) {
94 94
 	os.RemoveAll(d.root)
95 95
 }
96 96
 
97
-// GetDriver create a new driver with given name or return a existing driver with the name updating the reference count.
97
+// GetDriver create a new driver with given name or return an existing driver with the name updating the reference count.
98 98
 func GetDriver(t *testing.T, name string) graphdriver.Driver {
99 99
 	if drv == nil {
100 100
 		drv = newDriver(t, name)
... ...
@@ -172,7 +172,7 @@ func readDir(dir string) ([]os.FileInfo, error) {
172 172
 	return b, nil
173 173
 }
174 174
 
175
-// DriverTestCreateEmpty creates an new image and verifies it is empty and the right metadata
175
+// DriverTestCreateEmpty creates a new image and verifies it is empty and the right metadata
176 176
 func DriverTestCreateEmpty(t *testing.T, drivername string) {
177 177
 	driver := GetDriver(t, drivername)
178 178
 	defer PutDriver(t)
... ...
@@ -74,8 +74,8 @@ func (d *naiveDiffDriverWithApply) ApplyDiff(id, parent string, diff archive.Rea
74 74
 // layer in the overlay. The overlay itself is mounted in the "merged"
75 75
 // directory, and the "work" dir is needed for overlay to work.
76 76
 
77
-// When a overlay layer is created there are two cases, either the
78
-// parent has a "root" dir, then we start out with a empty "upper"
77
+// When an overlay layer is created there are two cases, either the
78
+// parent has a "root" dir, then we start out with an empty "upper"
79 79
 // directory overlaid on the parents root. This is typically the
80 80
 // case with the init layer of a container which is based on an image.
81 81
 // If there is no "root" in the parent, we inherit the lower-id from
... ...
@@ -103,7 +103,7 @@ func init() {
103 103
 
104 104
 // Init returns the NaiveDiffDriver, a native diff driver for overlay filesystem.
105 105
 // If overlay filesystem is not supported on the host, graphdriver.ErrNotSupported is returned as error.
106
-// If a overlay filesystem is not supported over a existing filesystem then error graphdriver.ErrIncompatibleFS is returned.
106
+// If an overlay filesystem is not supported over an existing filesystem then error graphdriver.ErrIncompatibleFS is returned.
107 107
 func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
108 108
 
109 109
 	if err := supportsOverlay(); err != nil {
... ...
@@ -265,7 +265,7 @@ func (d *Driver) Create(id, parent, mountLabel string, storageOpt map[string]str
265 265
 		return err
266 266
 	}
267 267
 
268
-	// If parent has a root, just do a overlay to it
268
+	// If parent has a root, just do an overlay to it
269 269
 	parentRoot := path.Join(parentDir, "root")
270 270
 
271 271
 	if s, err := os.Lstat(parentRoot); err == nil {
... ...
@@ -386,7 +386,7 @@ func (d *Driver) Put(id string) error {
386 386
 	return nil
387 387
 }
388 388
 
389
-// ApplyDiff applies the new layer on top of the root, if parent does not exist with will return a ErrApplyDiffFallback error.
389
+// ApplyDiff applies the new layer on top of the root, if parent does not exist with will return an ErrApplyDiffFallback error.
390 390
 func (d *Driver) ApplyDiff(id string, parent string, diff archive.Reader) (size int64, err error) {
391 391
 	dir := d.dir(id)
392 392
 
... ...
@@ -40,7 +40,7 @@ func (*Logger) Log(cmd []string) {
40 40
 }
41 41
 
42 42
 // Init returns a new ZFS driver.
43
-// It takes base mount path and a array of options which are represented as key value pairs.
43
+// It takes base mount path and an array of options which are represented as key value pairs.
44 44
 // Each option is in the for key=value. 'zfs.fsname' is expected to be a valid key in the options.
45 45
 func Init(base string, opt []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
46 46
 	var err error
... ...
@@ -8,7 +8,7 @@
8 8
 // 3. logman stop -ets DockerContainerLogs
9 9
 // 4. You can then convert the etl log file to XML using: tracerpt -y trace.etl
10 10
 //
11
-// Each container log message generates a ETW event that also contains:
11
+// Each container log message generates an ETW event that also contains:
12 12
 // the container name and ID, the timestamp, and the stream type.
13 13
 package etwlogs
14 14
 
... ...
@@ -305,7 +305,7 @@ func setNamespaces(daemon *Daemon, s *specs.Spec, c *container.Container) error
305 305
 		ns.Path = fmt.Sprintf("/proc/%d/ns/pid", pc.State.GetPID())
306 306
 		setNamespace(s, ns)
307 307
 		if userNS {
308
-			// to share an PID namespace, they must also share a user namespace
308
+			// to share a PID namespace, they must also share a user namespace
309 309
 			nsUser := specs.Namespace{Type: "user"}
310 310
 			nsUser.Path = fmt.Sprintf("/proc/%d/ns/user", pc.State.GetPID())
311 311
 			setNamespace(s, nsUser)
... ...
@@ -34,7 +34,7 @@ func (dcs dumbCredentialStore) RefreshToken(*url.URL, string) string {
34 34
 func (dcs dumbCredentialStore) SetRefreshToken(*url.URL, string, string) {
35 35
 }
36 36
 
37
-// NewV2Repository returns a repository (v2 only). It creates a HTTP transport
37
+// NewV2Repository returns a repository (v2 only). It creates an HTTP transport
38 38
 // providing timeout settings and authentication support, and also verifies the
39 39
 // remote API version.
40 40
 func NewV2Repository(ctx context.Context, repoInfo *registry.RepositoryInfo, endpoint registry.APIEndpoint, metaHeaders http.Header, authConfig *types.AuthConfig, actions ...string) (repo distribution.Repository, foundVersion bool, err error) {
... ...
@@ -48,7 +48,7 @@ Some of the daemon's options are:
48 48
 | `--tls=false`         | Enable or disable TLS. By default, this is false.         |
49 49
 
50 50
 
51
-Here is a an example of running the `docker` daemon with configuration options:
51
+Here is an example of running the `docker` daemon with configuration options:
52 52
 
53 53
     $ dockerd -D --tls=true --tlscert=/var/docker/server.pem --tlskey=/var/docker/serverkey.pem -H tcp://192.168.59.3:2376
54 54
 
... ...
@@ -89,7 +89,7 @@ and [its documents](http://docs.fluentd.org/).
89 89
 To use this logging driver, start the `fluentd` daemon on a host. We recommend
90 90
 that you use [the Fluentd docker
91 91
 image](https://hub.docker.com/r/fluent/fluentd/). This image is
92
-especially useful if you want to aggregate multiple container logs on a each
92
+especially useful if you want to aggregate multiple container logs on each
93 93
 host then, later, transfer the logs to another Fluentd node to create an
94 94
 aggregate store.
95 95
 
... ...
@@ -123,7 +123,7 @@ If you fail to specify an empty configuration, Docker reports an error such as:
123 123
 
124 124
 This example overrides the default `docker.service` file.
125 125
 
126
-If you are behind a HTTP proxy server, for example in corporate settings,
126
+If you are behind an HTTP proxy server, for example in corporate settings,
127 127
 you will need to add this configuration in the Docker systemd service file.
128 128
 
129 129
 First, create a systemd drop-in directory for the docker service:
... ...
@@ -1,7 +1,7 @@
1 1
 <!--[metadata]>
2 2
 +++
3 3
 title = "Dockerizing a Redis service"
4
-description = "Installing and running an redis service"
4
+description = "Installing and running a redis service"
5 5
 keywords = ["docker, example, package installation, networking,  redis"]
6 6
 [menu.main]
7 7
 parent = "engine_dockerize"
... ...
@@ -26,7 +26,7 @@ version, open a terminal and use `uname -r` to display your kernel version:
26 26
     $ uname -r
27 27
     3.19.5-100.fc21.x86_64
28 28
 
29
-If your kernel is at a older version, you must update it.
29
+If your kernel is at an older version, you must update it.
30 30
 
31 31
 Finally, is it recommended that you fully update your system. Please keep in
32 32
 mind that your system should be fully patched to fix any potential kernel bugs. Any
... ...
@@ -85,7 +85,7 @@ Docker container using standard localhost addressing such as `localhost:8000` or
85 85
 
86 86
 ![Linux Architecture Diagram](images/linux_docker_host.svg)
87 87
 
88
-In an Windows installation, the `docker` daemon is running inside a Linux virtual
88
+In a Windows installation, the `docker` daemon is running inside a Linux virtual
89 89
 machine. You use the Windows Docker client to talk to the Docker host VM. Your
90 90
 Docker containers run inside this host.
91 91
 
... ...
@@ -116,8 +116,8 @@ This section lists each version from latest to oldest.  Each listing includes a
116 116
 * `GET /info` now returns `SecurityOptions` field, showing if `apparmor`, `seccomp`, or `selinux` is supported.
117 117
 * `GET /networks` now supports filtering by `label` and `driver`.
118 118
 * `POST /containers/create` now takes `MaximumIOps` and `MaximumIOBps` fields. Windows daemon only.
119
-* `POST /containers/create` now returns a HTTP 400 "bad parameter" message
120
-  if no command is specified (instead of a HTTP 500 "server error")
119
+* `POST /containers/create` now returns an HTTP 400 "bad parameter" message
120
+  if no command is specified (instead of an HTTP 500 "server error")
121 121
 * `GET /images/search` now takes a `filters` query parameter.
122 122
 * `GET /events` now supports a `reload` event that is emitted when the daemon configuration is reloaded.
123 123
 * `GET /events` now supports filtering by daemon name or ID.
... ...
@@ -1128,7 +1128,7 @@ following section.
1128 1128
 
1129 1129
 `GET /containers/(id or name)/archive`
1130 1130
 
1131
-Get an tar archive of a resource in the filesystem of container `id`.
1131
+Get a tar archive of a resource in the filesystem of container `id`.
1132 1132
 
1133 1133
 Query Parameters:
1134 1134
 
... ...
@@ -1219,7 +1219,7 @@ following section.
1219 1219
 
1220 1220
 `GET /containers/(id or name)/archive`
1221 1221
 
1222
-Get an tar archive of a resource in the filesystem of container `id`.
1222
+Get a tar archive of a resource in the filesystem of container `id`.
1223 1223
 
1224 1224
 Query Parameters:
1225 1225
 
... ...
@@ -1390,7 +1390,7 @@ following section.
1390 1390
 
1391 1391
 `GET /containers/(id or name)/archive`
1392 1392
 
1393
-Get an tar archive of a resource in the filesystem of container `id`.
1393
+Get a tar archive of a resource in the filesystem of container `id`.
1394 1394
 
1395 1395
 Query Parameters:
1396 1396
 
... ...
@@ -1420,7 +1420,7 @@ following section.
1420 1420
 
1421 1421
 `GET /containers/(id or name)/archive`
1422 1422
 
1423
-Get an tar archive of a resource in the filesystem of container `id`.
1423
+Get a tar archive of a resource in the filesystem of container `id`.
1424 1424
 
1425 1425
 Query Parameters:
1426 1426
 
... ...
@@ -1430,7 +1430,7 @@ following section.
1430 1430
 
1431 1431
 `GET /containers/(id or name)/archive`
1432 1432
 
1433
-Get an tar archive of a resource in the filesystem of container `id`.
1433
+Get a tar archive of a resource in the filesystem of container `id`.
1434 1434
 
1435 1435
 Query Parameters:
1436 1436
 
... ...
@@ -51,7 +51,7 @@ foreground over a slow client connection. Instead, users should use the
51 51
 
52 52
 ## Override the detach sequence
53 53
 
54
-If you want, you can configure a override the Docker key sequence for detach.
54
+If you want, you can configure an override the Docker key sequence for detach.
55 55
 This is is useful if the Docker default sequence conflicts with key squence you
56 56
 use for other applications. There are two ways to defines a your own detach key
57 57
 sequence, as a per-container override or as a configuration property on  your
... ...
@@ -587,9 +587,9 @@ system's list of trusted CAs instead of enabling `--insecure-registry`.
587 587
 
588 588
 Enabling `--disable-legacy-registry` forces a docker daemon to only interact with registries which support the V2 protocol.  Specifically, the daemon will not attempt `push`, `pull` and `login` to v1 registries.  The exception to this is `search` which can still be performed on v1 registries.
589 589
 
590
-## Running a Docker daemon behind a HTTPS_PROXY
590
+## Running a Docker daemon behind an HTTPS_PROXY
591 591
 
592
-When running inside a LAN that uses a `HTTPS` proxy, the Docker Hub
592
+When running inside a LAN that uses an `HTTPS` proxy, the Docker Hub
593 593
 certificates will be replaced by the proxy's certificates. These certificates
594 594
 need to be added to your Docker host's configuration:
595 595
 
... ...
@@ -29,7 +29,7 @@ use `docker pull`.
29 29
 
30 30
 ## Proxy configuration
31 31
 
32
-If you are behind a HTTP proxy server, for example in corporate settings,
32
+If you are behind an HTTP proxy server, for example in corporate settings,
33 33
 before open a connect to registry, you may need to configure the Docker
34 34
 daemon's proxy settings, using the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
35 35
 environment variables. To set these environment variables on a host using
... ...
@@ -12,7 +12,7 @@ parent = "smn_secure_docker"
12 12
 # Protect the Docker daemon socket
13 13
 
14 14
 By default, Docker runs via a non-networked Unix socket. It can also
15
-optionally communicate using a HTTP socket.
15
+optionally communicate using an HTTP socket.
16 16
 
17 17
 If you need Docker to be reachable via the network in a safe manner, you can
18 18
 enable TLS by specifying the `tlsverify` flag and pointing Docker's
... ...
@@ -107,7 +107,7 @@ Trust for an image tag is managed through the use of signing keys. A key set is
107 107
 created when an operation using content trust is first invoked. A key set consists
108 108
 of the following classes of keys:
109 109
 
110
-- an offline key that is the root of content trust for a image tag
110
+- an offline key that is the root of content trust for an image tag
111 111
 - repository or tagging keys that sign tags
112 112
 - server-managed keys such as the timestamp key, which provides freshness
113 113
 	security guarantees for your repository
... ...
@@ -67,7 +67,7 @@ e is 65537 (0x10001)
67 67
 They should keep `delegation.key` private - this is what they will use to sign
68 68
 tags.
69 69
 
70
-Then they need to generate a x509 certificate containing the public key, which is
70
+Then they need to generate an x509 certificate containing the public key, which is
71 71
 what they will give to you.  Here is the command to generate a CSR (certificate
72 72
 signing request):
73 73
 
... ...
@@ -15,7 +15,7 @@ trust makes use of five different types of keys:
15 15
 
16 16
 | Key                 | Description                                                                                                                                                                                                                                                                                                                                                                         |
17 17
 |---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
18
-| root key         | Root of content trust for a image tag. When content trust is enabled, you create the root key once. Also known as the offline key, because it should be kept offline. |
18
+| root key         | Root of content trust for an image tag. When content trust is enabled, you create the root key once. Also known as the offline key, because it should be kept offline. |
19 19
 | targets          | This key allows you to sign image tags, to manage delegations including delegated keys or permitted delegation paths. Also known as the repository key, since this key determines what tags can be signed into an image repository. |
20 20
 | snapshot         | This key signs the current collection of image tags, preventing mix and match attacks.
21 21
 | timestamp        | This key allows Docker image repositories to have freshness security guarantees without requiring periodic content refreshes on the client's side. |
... ...
@@ -87,7 +87,7 @@ Go to [Docker Machine user guide](https://docs.docker.com/machine/).
87 87
 
88 88
 ### Docker Compose
89 89
 
90
-Docker Compose allows you to define a application's components -- their containers,
90
+Docker Compose allows you to define an application's components -- their containers,
91 91
 configuration, links and volumes -- in a single file. Then a single command
92 92
 will set everything up and start your application running.
93 93
 
... ...
@@ -76,7 +76,7 @@ func (s *DockerAuthzSuite) TearDownTest(c *check.C) {
76 76
 func (s *DockerAuthzSuite) SetUpSuite(c *check.C) {
77 77
 	mux := http.NewServeMux()
78 78
 	s.server = httptest.NewServer(mux)
79
-	c.Assert(s.server, check.NotNil, check.Commentf("Failed to start a HTTP Server"))
79
+	c.Assert(s.server, check.NotNil, check.Commentf("Failed to start an HTTP Server"))
80 80
 
81 81
 	mux.HandleFunc("/Plugin.Activate", func(w http.ResponseWriter, r *http.Request) {
82 82
 		b, err := json.Marshal(plugins.Manifest{Implements: []string{authorization.AuthZApiImplements}})
... ...
@@ -346,7 +346,7 @@ func (s *DockerRegistrySuite) TestPsListContainersFilterAncestorImageByDigest(c
346 346
 	// pull from the registry using the <name>@<digest> reference
347 347
 	dockerCmd(c, "pull", imageReference)
348 348
 
349
-	// build a image from it
349
+	// build an image from it
350 350
 	imageName1 := "images_ps_filter_test"
351 351
 	_, err = buildImage(imageName1, fmt.Sprintf(
352 352
 		`FROM %s
... ...
@@ -647,7 +647,7 @@ func (s *DockerSuite) TestCpSymlinkFromConToHostFollowSymlink(c *check.C) {
647 647
 	}
648 648
 	os.Remove(expectedPath)
649 649
 
650
-	// now test copy symbol link to an non-existing file in host
650
+	// now test copy symbol link to a non-existing file in host
651 651
 	expectedPath = filepath.Join(testDir, "somefile_host")
652 652
 	// expectedPath shouldn't exist, if exists, remove it
653 653
 	if _, err := os.Lstat(expectedPath); err == nil {
... ...
@@ -449,7 +449,7 @@ func (s *DockerDaemonSuite) TestDaemonIPv6FixedCIDR(c *check.C) {
449 449
 }
450 450
 
451 451
 // TestDaemonIPv6FixedCIDRAndMac checks that when the daemon is started with ipv6 fixed CIDR
452
-// the running containers are given a an IPv6 address derived from the MAC address and the ipv6 fixed CIDR
452
+// the running containers are given an IPv6 address derived from the MAC address and the ipv6 fixed CIDR
453 453
 func (s *DockerDaemonSuite) TestDaemonIPv6FixedCIDRAndMac(c *check.C) {
454 454
 	// IPv6 setup is messing with local bridge address.
455 455
 	testRequires(c, SameHostDaemon)
... ...
@@ -72,7 +72,7 @@ func (s *DockerExternalVolumeSuite) SetUpSuite(c *check.C) {
72 72
 	type vol struct {
73 73
 		Name       string
74 74
 		Mountpoint string
75
-		Ninja      bool // hack used to trigger an null volume return on `Get`
75
+		Ninja      bool // hack used to trigger a null volume return on `Get`
76 76
 		Status     map[string]interface{}
77 77
 	}
78 78
 	var volList []vol
... ...
@@ -73,7 +73,7 @@ func (s *DockerSuite) TestHistoryNonExistentImage(c *check.C) {
73 73
 func (s *DockerSuite) TestHistoryImageWithComment(c *check.C) {
74 74
 	name := "testhistoryimagewithcomment"
75 75
 
76
-	// make a image through docker commit <container id> [ -m messages ]
76
+	// make an image through docker commit <container id> [ -m messages ]
77 77
 
78 78
 	dockerCmd(c, "run", "--name", name, "busybox", "true")
79 79
 	dockerCmd(c, "wait", name)
... ...
@@ -13,7 +13,7 @@ import (
13 13
 const stringCheckPS = "PID   USER"
14 14
 
15 15
 // DockerCmdWithFail executes a docker command that is supposed to fail and returns
16
-// the output, the exit code. If the command returns an Nil error, it will fail and
16
+// the output, the exit code. If the command returns a Nil error, it will fail and
17 17
 // stop the tests.
18 18
 func dockerCmdWithFail(c *check.C, args ...string) (string, int) {
19 19
 	out, status, err := dockerCmdWithError(args...)
... ...
@@ -56,7 +56,7 @@ func (s *DockerNetworkSuite) TearDownTest(c *check.C) {
56 56
 func (s *DockerNetworkSuite) SetUpSuite(c *check.C) {
57 57
 	mux := http.NewServeMux()
58 58
 	s.server = httptest.NewServer(mux)
59
-	c.Assert(s.server, check.NotNil, check.Commentf("Failed to start a HTTP Server"))
59
+	c.Assert(s.server, check.NotNil, check.Commentf("Failed to start an HTTP Server"))
60 60
 	setupRemoteNetworkDrivers(c, mux, s.server.URL, dummyNetworkDriver, dummyIpamDriver)
61 61
 }
62 62
 
... ...
@@ -270,7 +270,7 @@ func (s *DockerSuite) TestRmiContainerImageNotFound(c *check.C) {
270 270
 // #13422
271 271
 func (s *DockerSuite) TestRmiUntagHistoryLayer(c *check.C) {
272 272
 	image := "tmp1"
273
-	// Build a image for testing.
273
+	// Build an image for testing.
274 274
 	dockerfile := `FROM busybox
275 275
 MAINTAINER foo
276 276
 RUN echo 0 #layer0
... ...
@@ -17,7 +17,7 @@ func init() {
17 17
 	}
18 18
 }
19 19
 
20
-// DockerHubPullSuite provides a isolated daemon that doesn't have all the
20
+// DockerHubPullSuite provides an isolated daemon that doesn't have all the
21 21
 // images that are baked into our 'global' test environment daemon (e.g.,
22 22
 // busybox, httpserver, ...).
23 23
 //
... ...
@@ -82,7 +82,7 @@ func (s *DockerHubPullSuite) CmdWithError(name string, arg ...string) (string, e
82 82
 	return string(b), err
83 83
 }
84 84
 
85
-// MakeCmd returns a exec.Cmd command to run against the suite daemon.
85
+// MakeCmd returns an exec.Cmd command to run against the suite daemon.
86 86
 func (s *DockerHubPullSuite) MakeCmd(name string, arg ...string) *exec.Cmd {
87 87
 	args := []string{"--host", s.d.sock(), name}
88 88
 	args = append(args, arg...)
... ...
@@ -43,7 +43,7 @@ attaching to a tty-enabled container (i.e.: launched with `-t`).
43 43
 
44 44
 # Override the detach sequence
45 45
 
46
-If you want, you can configure a override the Docker key sequence for detach.
46
+If you want, you can configure an override the Docker key sequence for detach.
47 47
 This is is useful if the Docker default sequence conflicts with key squence you
48 48
 use for other applications. There are two ways to defines a your own detach key
49 49
 sequence, as a per-container override or as a configuration property on  your
... ...
@@ -223,7 +223,7 @@ output:
223 223
 You can get more information about how to write a Go template from:
224 224
 https://golang.org/pkg/text/template/.
225 225
 
226
-## Getting size information on an container
226
+## Getting size information on a container
227 227
 
228 228
     $ docker inspect -s d2cc496561d6
229 229
     [
... ...
@@ -219,7 +219,7 @@ See **config-json(5)** for documentation on using a configuration file.
219 219
    Limit write rate to a device (e.g. --device-write-bps=/dev/sda:1mb)
220 220
 
221 221
 **--device-write-iops**=[]
222
-   Limit write rate a a device (e.g. --device-write-iops=/dev/sda:1000)
222
+   Limit write rate to a device (e.g. --device-write-iops=/dev/sda:1000)
223 223
 
224 224
 **--dns-search**=[]
225 225
    Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
... ...
@@ -251,7 +251,7 @@ func ValidateLabel(val string) (string, error) {
251 251
 	return val, nil
252 252
 }
253 253
 
254
-// ValidateSysctl validates an sysctl and returns it.
254
+// ValidateSysctl validates a sysctl and returns it.
255 255
 func ValidateSysctl(val string) (string, error) {
256 256
 	validSysctlMap := map[string]bool{
257 257
 		"kernel.msgmax":          true,
... ...
@@ -132,7 +132,7 @@ func TestDecompressStreamXz(t *testing.T) {
132 132
 	archive, err := os.Open(tmp + "archive.xz")
133 133
 	_, err = DecompressStream(archive)
134 134
 	if err != nil {
135
-		t.Fatalf("Failed to decompress a xz file.")
135
+		t.Fatalf("Failed to decompress an xz file.")
136 136
 	}
137 137
 }
138 138
 
... ...
@@ -181,7 +181,7 @@ func TestExtensionUncompressed(t *testing.T) {
181 181
 	compression := Uncompressed
182 182
 	output := compression.Extension()
183 183
 	if output != "tar" {
184
-		t.Fatalf("The extension of a uncompressed archive should be 'tar'.")
184
+		t.Fatalf("The extension of an uncompressed archive should be 'tar'.")
185 185
 	}
186 186
 }
187 187
 func TestExtensionBzip2(t *testing.T) {
... ...
@@ -252,7 +252,7 @@ func TestChangesWithChangesGH13590(t *testing.T) {
252 252
 	checkChanges(expectedChanges, changes, t)
253 253
 }
254 254
 
255
-// Create an directory, copy it, make sure we report no changes between the two
255
+// Create a directory, copy it, make sure we report no changes between the two
256 256
 func TestChangesDirsEmpty(t *testing.T) {
257 257
 	// TODO Windows. There may be a way of running this, but turning off for now
258 258
 	// as createSampleDir uses symlinks.
... ...
@@ -40,7 +40,7 @@ func NewCtx(authZPlugins []Plugin, user, userAuthNMethod, requestMethod, request
40 40
 	}
41 41
 }
42 42
 
43
-// Ctx stores a a single request-response interaction context
43
+// Ctx stores a single request-response interaction context
44 44
 type Ctx struct {
45 45
 	user            string
46 46
 	userAuthNMethod string
... ...
@@ -99,7 +99,7 @@ func (errorReaderCloser) Read(p []byte) (n int, err error) {
99 99
 	return 0, fmt.Errorf("An error occurred")
100 100
 }
101 101
 
102
-// If a an unknown error is encountered, return 0, nil and log it
102
+// If an unknown error is encountered, return 0, nil and log it
103 103
 func TestResumableRequestReaderWithReadError(t *testing.T) {
104 104
 	var req *http.Request
105 105
 	req, err := http.NewRequest("GET", "", nil)
... ...
@@ -55,7 +55,7 @@ func HashData(src io.Reader) (string, error) {
55 55
 	return "sha256:" + hex.EncodeToString(h.Sum(nil)), nil
56 56
 }
57 57
 
58
-// OnEOFReader wraps a io.ReadCloser and a function
58
+// OnEOFReader wraps an io.ReadCloser and a function
59 59
 // the function will run at the end of file or close the file.
60 60
 type OnEOFReader struct {
61 61
 	Rc io.ReadCloser
... ...
@@ -13,7 +13,7 @@ import (
13 13
 )
14 14
 
15 15
 // JSONError wraps a concrete Code and Message, `Code` is
16
-// is a integer error code, `Message` is the error message.
16
+// is an integer error code, `Message` is the error message.
17 17
 type JSONError struct {
18 18
 	Code    int    `json:"code,omitempty"`
19 19
 	Message string `json:"message,omitempty"`
... ...
@@ -1,5 +1,5 @@
1 1
 Package mflag (aka multiple-flag) implements command-line flag parsing.  
2
-It's an **hacky** fork of the [official golang package](http://golang.org/pkg/flag/)
2
+It's a **hacky** fork of the [official golang package](http://golang.org/pkg/flag/)
3 3
 
4 4
 It adds:
5 5
 
... ...
@@ -24,7 +24,7 @@
24 24
 //
25 25
 //	You can also add "deprecated" flags, they are still usable, but are not shown
26 26
 //	in the usage and will display a warning when you try to use them. `#` before
27
-//	an option means this option is deprecated, if there is an following option
27
+//	an option means this option is deprecated, if there is a following option
28 28
 //	without `#` ahead, then that's the replacement, if not, it will just be removed:
29 29
 //		var ip = flag.Int([]string{"#f", "#flagname", "-flagname"}, 1234, "help message for flagname")
30 30
 //	this will display: `Warning: '-f' is deprecated, it will be replaced by '--flagname' soon. See usage.` or
... ...
@@ -1236,7 +1236,7 @@ func (v mergeVal) Name() string {
1236 1236
 	return v.key
1237 1237
 }
1238 1238
 
1239
-// Merge is an helper function that merges n FlagSets into a single dest FlagSet
1239
+// Merge is a helper function that merges n FlagSets into a single dest FlagSet
1240 1240
 // In case of name collision between the flagsets it will apply
1241 1241
 // the destination FlagSet's errorHandling behavior.
1242 1242
 func Merge(dest *FlagSet, flagsets ...*FlagSet) error {
... ...
@@ -38,7 +38,7 @@ func (out chanOutput) WriteProgress(p Progress) error {
38 38
 	return nil
39 39
 }
40 40
 
41
-// ChanOutput returns a Output that writes progress updates to the
41
+// ChanOutput returns an Output that writes progress updates to the
42 42
 // supplied channel.
43 43
 func ChanOutput(progressChan chan<- Progress) Output {
44 44
 	return chanOutput(progressChan)
... ...
@@ -155,7 +155,7 @@ func IsNameOnly(ref Named) bool {
155 155
 	return true
156 156
 }
157 157
 
158
-// ParseIDOrReference parses string for a image ID or a reference. ID can be
158
+// ParseIDOrReference parses string for an image ID or a reference. ID can be
159 159
 // without a default prefix.
160 160
 func ParseIDOrReference(idOrRef string) (digest.Digest, Named, error) {
161 161
 	if err := v1.ValidateID(idOrRef); err == nil {
... ...
@@ -48,7 +48,7 @@ type store struct {
48 48
 	referencesByIDCache map[image.ID]map[string]Named
49 49
 }
50 50
 
51
-// Repository maps tags to image IDs. The key is a a stringified Reference,
51
+// Repository maps tags to image IDs. The key is a stringified Reference,
52 52
 // including the repository name.
53 53
 type repository map[string]image.ID
54 54
 
... ...
@@ -114,7 +114,7 @@ func DockerHeaders(userAgent string, metaHeaders http.Header) []transport.Reques
114 114
 	return modifiers
115 115
 }
116 116
 
117
-// HTTPClient returns a HTTP client structure which uses the given transport
117
+// HTTPClient returns an HTTP client structure which uses the given transport
118 118
 // and contains the necessary headers for redirected requests
119 119
 func HTTPClient(transport http.RoundTripper) *http.Client {
120 120
 	return &http.Client{
... ...
@@ -95,7 +95,7 @@ func cloneRequest(r *http.Request) *http.Request {
95 95
 	return r2
96 96
 }
97 97
 
98
-// RoundTrip changes a HTTP request's headers to add the necessary
98
+// RoundTrip changes an HTTP request's headers to add the necessary
99 99
 // authentication-related headers
100 100
 func (tr *authTransport) RoundTrip(orig *http.Request) (*http.Response, error) {
101 101
 	// Authorization should not be set on 302 redirect for untrusted locations.
... ...
@@ -29,7 +29,7 @@ type ImgData struct {
29 29
 // indicates the registry's version and whether the registry claims to be a
30 30
 // standalone registry.
31 31
 type PingResult struct {
32
-	// Version is the registry version supplied by the registry in a HTTP
32
+	// Version is the registry version supplied by the registry in an HTTP
33 33
 	// header
34 34
 	Version string `json:"version"`
35 35
 	// Standalone is set to true if the registry indicates it is a
... ...
@@ -95,10 +95,10 @@ func TestParseEnvFileBadlyFormattedFile(t *testing.T) {
95 95
 
96 96
 	_, err := ParseEnvFile(tmpFile)
97 97
 	if err == nil {
98
-		t.Fatalf("Expected a ErrBadEnvVariable, got nothing")
98
+		t.Fatalf("Expected an ErrBadEnvVariable, got nothing")
99 99
 	}
100 100
 	if _, ok := err.(ErrBadEnvVariable); !ok {
101
-		t.Fatalf("Expected a ErrBadEnvVariable, got [%v]", err)
101
+		t.Fatalf("Expected an ErrBadEnvVariable, got [%v]", err)
102 102
 	}
103 103
 	expectedMessage := "poorly formatted environment: variable 'f   ' has white spaces"
104 104
 	if err.Error() != expectedMessage {
... ...
@@ -130,10 +130,10 @@ another invalid line`
130 130
 	_, err := ParseEnvFile(tmpFile)
131 131
 
132 132
 	if err == nil {
133
-		t.Fatalf("Expected a ErrBadEnvVariable, got nothing")
133
+		t.Fatalf("Expected an ErrBadEnvVariable, got nothing")
134 134
 	}
135 135
 	if _, ok := err.(ErrBadEnvVariable); !ok {
136
-		t.Fatalf("Expected a ErrBadEnvvariable, got [%v]", err)
136
+		t.Fatalf("Expected an ErrBadEnvvariable, got [%v]", err)
137 137
 	}
138 138
 	expectedMessage := "poorly formatted environment: variable 'first line' has white spaces"
139 139
 	if err.Error() != expectedMessage {
... ...
@@ -614,14 +614,14 @@ func TestParseEnvfileVariables(t *testing.T) {
614 614
 		t.Fatal(err)
615 615
 	}
616 616
 	if len(config.Env) != 1 || config.Env[0] != "ENV1=value1" {
617
-		t.Fatalf("Expected a a config with [ENV1=value1], got %v", config.Env)
617
+		t.Fatalf("Expected a config with [ENV1=value1], got %v", config.Env)
618 618
 	}
619 619
 	config, _, _, _, err = parseRun([]string{"--env-file=fixtures/valid.env", "--env=ENV2=value2", "img", "cmd"})
620 620
 	if err != nil {
621 621
 		t.Fatal(err)
622 622
 	}
623 623
 	if len(config.Env) != 2 || config.Env[0] != "ENV1=value1" || config.Env[1] != "ENV2=value2" {
624
-		t.Fatalf("Expected a a config with [ENV1=value1 ENV2=value2], got %v", config.Env)
624
+		t.Fatalf("Expected a config with [ENV1=value1 ENV2=value2], got %v", config.Env)
625 625
 	}
626 626
 }
627 627
 
... ...
@@ -640,14 +640,14 @@ func TestParseLabelfileVariables(t *testing.T) {
640 640
 		t.Fatal(err)
641 641
 	}
642 642
 	if len(config.Labels) != 1 || config.Labels["LABEL1"] != "value1" {
643
-		t.Fatalf("Expected a a config with [LABEL1:value1], got %v", config.Labels)
643
+		t.Fatalf("Expected a config with [LABEL1:value1], got %v", config.Labels)
644 644
 	}
645 645
 	config, _, _, _, err = parseRun([]string{"--label-file=fixtures/valid.label", "--label=LABEL2=value2", "img", "cmd"})
646 646
 	if err != nil {
647 647
 		t.Fatal(err)
648 648
 	}
649 649
 	if len(config.Labels) != 2 || config.Labels["LABEL1"] != "value1" || config.Labels["LABEL2"] != "value2" {
650
-		t.Fatalf("Expected a a config with [LABEL1:value1 LABEL2:value2], got %v", config.Labels)
650
+		t.Fatalf("Expected a config with [LABEL1:value1 LABEL2:value2], got %v", config.Labels)
651 651
 	}
652 652
 }
653 653