diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5d20383685..386180597c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -378,7 +378,7 @@ The rules: 5. Document _all_ declarations and methods, even private ones. Declare expectations, caveats and anything else that may be important. If a type gets exported, having the comments already there will ensure it's ready. -6. Variable name length should be proportional to it's context and no longer. +6. Variable name length should be proportional to its context and no longer. `noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo`. In practice, short methods will have short variable names and globals will have longer names. @@ -386,7 +386,7 @@ The rules: and re-examine why you need a compound name. If you still think you need a compound name, lose the underscore. 8. No utils or helpers packages. If a function is not general enough to - warrant it's own package, it has not been written generally enough to be a + warrant its own package, it has not been written generally enough to be a part of a util package. Just leave it unexported and well-documented. 9. All tests should run with `go test` and outside tooling should not be required. No, we don't need another unit testing framework. Assertion diff --git a/api/client/container/utils.go b/api/client/container/utils.go index 0fbfd3d520..b25e0dff57 100644 --- a/api/client/container/utils.go +++ b/api/client/container/utils.go @@ -7,7 +7,7 @@ import ( clientapi "github.com/docker/engine-api/client" ) -// getExitCode perform an inspect on the container. It returns +// getExitCode performs an inspect on the container. It returns // the running state and the exit code. func getExitCode(dockerCli *client.DockerCli, ctx context.Context, containerID string) (bool, int, error) { c, err := dockerCli.Client().ContainerInspect(ctx, containerID) diff --git a/contrib/syscall-test/ns.c b/contrib/syscall-test/ns.c index bc897add9e..33684e1c3d 100644 --- a/contrib/syscall-test/ns.c +++ b/contrib/syscall-test/ns.c @@ -48,7 +48,7 @@ int main(int argc, char **argv) child_stack = stack + STACK_SIZE; /* Assume stack grows downward */ // the result of this call is that our child_exec will be run in another - // process returning it's pid + // process returning its pid pid_t pid = clone(child_exec, child_stack, clone_flags, &args); if (pid < 0) { fprintf(stderr, "clone failed: %s\n", strerror(errno)); diff --git a/contrib/syscall-test/userns.c b/contrib/syscall-test/userns.c index 6ec553fe74..2af36f4228 100644 --- a/contrib/syscall-test/userns.c +++ b/contrib/syscall-test/userns.c @@ -48,7 +48,7 @@ int main(int argc, char **argv) child_stack = stack + STACK_SIZE; /* Assume stack grows downward */ // the result of this call is that our child_exec will be run in another - // process returning it's pid + // process returning its pid pid_t pid = clone(child_exec, child_stack, clone_flags, &args); if (pid < 0) { fprintf(stderr, "clone failed: %s\n", strerror(errno)); diff --git a/daemon/daemon_test.go b/daemon/daemon_test.go index 609ed95258..d799823970 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -105,7 +105,7 @@ func TestGetContainer(t *testing.T) { } if container, _ := daemon.GetContainer("d22d69a2b896"); container != c5 { - t.Fatal("Should match a container where the provided prefix is an exact match to the it's name, and is also a prefix for it's ID") + t.Fatal("Should match a container where the provided prefix is an exact match to the its name, and is also a prefix for its ID") } if _, err := daemon.GetContainer("3cdbd1"); err == nil { diff --git a/daemon/delete_test.go b/daemon/delete_test.go index adce2eb8c5..9db83b0685 100644 --- a/daemon/delete_test.go +++ b/daemon/delete_test.go @@ -34,7 +34,7 @@ func TestContainerDoubleDelete(t *testing.T) { // Mark the container as having a delete in progress container.SetRemovalInProgress() - // Try to remove the container when it's start is removalInProgress. + // Try to remove the container when its start is removalInProgress. // It should ignore the container and not return an error. if err := daemon.ContainerRm(container.ID, &types.ContainerRmConfig{ForceRemove: true}); err != nil { t.Fatal(err) diff --git a/daemon/graphdriver/aufs/aufs.go b/daemon/graphdriver/aufs/aufs.go index 3e4df08dd1..6d970ab648 100644 --- a/daemon/graphdriver/aufs/aufs.go +++ b/daemon/graphdriver/aufs/aufs.go @@ -305,7 +305,7 @@ func (a *Driver) Remove(id string) error { } // Get returns the rootfs path for the id. -// This will mount the dir at it's given path +// This will mount the dir at its given path func (a *Driver) Get(id, mountLabel string) (string, error) { parents, err := a.getParentLayerPaths(id) if err != nil && !os.IsNotExist(err) { diff --git a/daemon/graphdriver/windows/windows.go b/daemon/graphdriver/windows/windows.go index 65af035047..dd54a1cbde 100644 --- a/daemon/graphdriver/windows/windows.go +++ b/daemon/graphdriver/windows/windows.go @@ -218,7 +218,7 @@ func (d *Driver) Remove(id string) error { return hcsshim.DestroyLayer(d.info, rID) } -// Get returns the rootfs path for the id. This will mount the dir at it's given path. +// Get returns the rootfs path for the id. This will mount the dir at its given path. func (d *Driver) Get(id, mountLabel string) (string, error) { logrus.Debugf("WindowsGraphDriver Get() id %s mountLabel %s", id, mountLabel) var dir string diff --git a/daemon/kill.go b/daemon/kill.go index a140a9d5e5..21645e5f49 100644 --- a/daemon/kill.go +++ b/daemon/kill.go @@ -75,7 +75,7 @@ func (daemon *Daemon) killWithSignal(container *container.Container, sig int) er } // if the container is currently restarting we do not need to send the signal - // to the process. Telling the monitor that it should exit on it's next event + // to the process. Telling the monitor that it should exit on its next event // loop is enough if container.Restarting { return nil diff --git a/docs/userguide/storagedriver/overlayfs-driver.md b/docs/userguide/storagedriver/overlayfs-driver.md index 6d4d47b5af..7ef35dbeaa 100644 --- a/docs/userguide/storagedriver/overlayfs-driver.md +++ b/docs/userguide/storagedriver/overlayfs-driver.md @@ -90,7 +90,7 @@ Docker image comprising five layers. Digest: sha256:46fb5d001b88ad904c5c732b086b596b92cfb4a4840a3abd0e35dbb6870585e4 Status: Downloaded newer image for ubuntu:latest -Each image layer has it's own directory under `/var/lib/docker/overlay/`. This +Each image layer has its own directory under `/var/lib/docker/overlay/`. This is where the contents of each image layer are stored. The output of the command below shows the five directories that store the diff --git a/experimental/vlan-networks.md b/experimental/vlan-networks.md index 6018ea8a60..56440672a2 100644 --- a/experimental/vlan-networks.md +++ b/experimental/vlan-networks.md @@ -223,7 +223,7 @@ docker exec -it cid3 /bin/sh VLANs (Virtual Local Area Networks) have long been a primary means of virtualizing data center networks and are still in virtually all existing networks today. VLANs work by tagging a Layer-2 isolation domain with a 12-bit identifier ranging from 1-4094 that is inserted into a packet header that enables a logical grouping of a single or multiple subnets of both IPv4 and IPv6. It is very common for network operators to separate traffic using VLANs based on a subnet(s) function or security profile such as `web`, `db` or any other isolation needs. -It is very common to have a compute host requirement of running multiple virtual networks concurrently on a host. Linux networking has long supported VLAN tagging, also known by it's standard 802.1q, for maintaining datapath isolation between networks. The Ethernet link connected to a Docker host can be configured to support the 802.1q VLAN IDs, by creating Linux sub-interfaces, each one dedicated to a unique VLAN ID. +It is very common to have a compute host requirement of running multiple virtual networks concurrently on a host. Linux networking has long supported VLAN tagging, also known by its standard 802.1q, for maintaining datapath isolation between networks. The Ethernet link connected to a Docker host can be configured to support the 802.1q VLAN IDs, by creating Linux sub-interfaces, each one dedicated to a unique VLAN ID. ![Simple Ipvlan L2 Mode Example](images/multi_tenant_8021q_vlans.png) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index fc785b9ac5..308bd703d5 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -4083,7 +4083,7 @@ func (s *DockerSuite) TestRunNonExistingCmd(c *check.C) { // TestCmdCannotBeInvoked checks that 'docker run busybox /etc' exits with 126, or // 127 on Windows. The difference is that in Windows, the container must be started -// as that's when the check is made (and yes, by it's design...) +// as that's when the check is made (and yes, by its design...) func (s *DockerSuite) TestCmdCannotBeInvoked(c *check.C) { expected := 126 if daemonPlatform == "windows" { diff --git a/integration-cli/registry.go b/integration-cli/registry.go index fa3fb87565..e3e16f1cfb 100644 --- a/integration-cli/registry.go +++ b/integration-cli/registry.go @@ -128,7 +128,7 @@ func (t *testRegistryV2) Close() { } func (t *testRegistryV2) getBlobFilename(blobDigest digest.Digest) string { - // Split the digest into it's algorithm and hex components. + // Split the digest into its algorithm and hex components. dgstAlg, dgstHex := blobDigest.Algorithm(), blobDigest.Hex() // The path to the target blob data looks something like: diff --git a/pkg/archive/copy.go b/pkg/archive/copy.go index e1fa73f374..a60c948d0d 100644 --- a/pkg/archive/copy.go +++ b/pkg/archive/copy.go @@ -103,7 +103,7 @@ func TarResourceRebase(sourcePath, rebaseName string) (content Archive, err erro return } - // Separate the source path between it's directory and + // Separate the source path between its directory and // the entry in that directory which we are archiving. sourceDir, sourceBase := SplitPathDirEntry(sourcePath) diff --git a/pkg/authorization/authz.go b/pkg/authorization/authz.go index ebbc380616..1f960289ad 100644 --- a/pkg/authorization/authz.go +++ b/pkg/authorization/authz.go @@ -119,7 +119,7 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { return nil } -// drainBody dump the body (if it's length is less than 1MB) without modifying the request state +// drainBody dump the body (if its length is less than 1MB) without modifying the request state func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { bufReader := bufio.NewReaderSize(body, maxBodySize) newBody := ioutils.NewReadCloserWrapper(bufReader, func() error { return body.Close() }) diff --git a/pkg/fileutils/fileutils.go b/pkg/fileutils/fileutils.go index 763d8d279c..c00a0cdee3 100644 --- a/pkg/fileutils/fileutils.go +++ b/pkg/fileutils/fileutils.go @@ -31,7 +31,7 @@ func CleanPatterns(patterns []string) ([]string, [][]string, bool, error) { // Loop over exclusion patterns and: // 1. Clean them up. // 2. Indicate whether we are dealing with any exception rules. - // 3. Error if we see a single exclusion marker on it's own (!). + // 3. Error if we see a single exclusion marker on its own (!). cleanedPatterns := []string{} patternDirs := [][]string{} exceptions := false diff --git a/volume/drivers/adapter.go b/volume/drivers/adapter.go index 5193f1acbc..46e2f790a8 100644 --- a/volume/drivers/adapter.go +++ b/volume/drivers/adapter.go @@ -89,7 +89,7 @@ func (a *volumeDriverAdapter) getCapabilities() volume.Capability { if err != nil { // `GetCapabilities` is a not a required endpoint. // On error assume it's a local-only driver - logrus.Warnf("Volume driver %s returned an error while trying to query it's capabilities, using default capabilties: %v", a.name, err) + logrus.Warnf("Volume driver %s returned an error while trying to query its capabilities, using default capabilties: %v", a.name, err) return volume.Capability{Scope: volume.LocalScope} }