From 927b334ebfc786276a039e45ec097e71bf9a104c Mon Sep 17 00:00:00 2001 From: Justas Brazauskas Date: Sun, 13 Dec 2015 18:00:39 +0200 Subject: [PATCH] Fix typos found across repository Signed-off-by: Justas Brazauskas --- api/client/build.go | 2 +- api/client/cp.go | 4 ++-- api/client/network.go | 6 +++--- api/client/start.go | 2 +- api/common.go | 2 +- api/server/middleware.go | 2 +- api/server/router/local/image.go | 2 +- api/server/router/local/local.go | 2 +- api/types/stats.go | 2 +- builder/dockerfile/bflag.go | 2 +- builder/dockerfile/dispatchers.go | 2 +- builder/dockerfile/evaluator.go | 2 +- builder/dockerfile/parser/parser_test.go | 2 +- cliconfig/config.go | 2 +- container/container.go | 2 +- container/container_windows.go | 2 +- container/monitor.go | 2 +- contrib/download-frozen-image-v2.sh | 4 ++-- daemon/archive.go | 2 +- daemon/create_windows.go | 4 ++-- daemon/debugtrap_windows.go | 2 +- daemon/execdriver/native/create.go | 2 +- daemon/graphdriver/btrfs/version_none.go | 2 +- daemon/graphdriver/devmapper/deviceset.go | 12 ++++++------ daemon/graphdriver/devmapper/devmapper_doc.go | 2 +- daemon/graphdriver/devmapper/driver.go | 2 +- daemon/graphdriver/driver.go | 6 +++--- daemon/graphdriver/overlay/overlay.go | 2 +- daemon/graphdriver/zfs/zfs.go | 2 +- daemon/kill.go | 2 +- daemon/list.go | 2 +- daemon/logger/fluentd/fluentd.go | 2 +- daemon/logger/jsonfilelog/read.go | 2 +- daemon/logger/loggerutils/rotatefilewriter.go | 4 ++-- daemon/logger/splunk/splunk.go | 2 +- daemon/network.go | 2 +- daemon/volumes.go | 4 ++-- distribution/push.go | 2 +- distribution/xfer/transfer.go | 6 +++--- docs/.gitignore | 2 +- docs/articles/b2d_volume_resize.md | 2 +- docs/articles/systemd.md | 2 +- docs/installation/SUSE.md | 2 +- docs/reference/api/docker_remote_api.md | 4 ++-- docs/reference/commandline/events.md | 4 ++-- docs/userguide/storagedriver/btrfs-driver.md | 2 +- errors/daemon.go | 2 +- experimental/plugins_graphdriver.md | 2 +- experimental/userns.md | 14 +++++++------- hack/make.sh | 2 +- hack/release.sh | 2 +- image/fs_test.go | 2 +- image/image.go | 2 +- image/rootfs_unix.go | 2 +- image/rootfs_windows.go | 2 +- integration-cli/docker_api_attach_test.go | 2 +- integration-cli/docker_cli_attach_unix_test.go | 2 +- integration-cli/docker_cli_build_test.go | 4 ++-- integration-cli/docker_cli_cp_to_container_test.go | 2 +- integration-cli/docker_cli_images_test.go | 2 +- integration-cli/docker_cli_network_unix_test.go | 6 +++--- integration-cli/docker_cli_port_test.go | 4 ++-- integration-cli/docker_cli_run_test.go | 2 +- integration-cli/docker_cli_volume_test.go | 4 ++-- integration-cli/docker_test_vars.go | 2 +- integration-cli/docker_utils.go | 6 +++--- layer/layer.go | 4 ++-- layer/layer_store.go | 2 +- man/docker-events.1.md | 6 +++--- man/docker-ps.1.md | 2 +- opts/envfile_test.go | 2 +- opts/ip.go | 2 +- pkg/archive/archive.go | 2 +- pkg/archive/archive_unix.go | 2 +- pkg/archive/archive_windows.go | 2 +- pkg/archive/changes.go | 2 +- pkg/archive/whiteouts.go | 2 +- pkg/devicemapper/attach_loopback.go | 2 +- pkg/discovery/kv/kv_test.go | 2 +- pkg/filenotify/filenotify.go | 2 +- pkg/filenotify/poller.go | 2 +- pkg/fileutils/fileutils.go | 2 +- pkg/integration/utils.go | 4 ++-- pkg/integration/utils_test.go | 2 +- pkg/ioutils/writers.go | 2 +- pkg/jsonlog/jsonlog.go | 4 ++-- pkg/jsonmessage/jsonmessage.go | 4 ++-- pkg/locker/locker.go | 2 +- pkg/mflag/flag.go | 2 +- pkg/mount/flags_linux.go | 2 +- pkg/mount/sharedsubtree_linux_test.go | 2 +- pkg/parsers/filters/parse.go | 2 +- pkg/random/random.go | 2 +- pkg/reexec/reexec.go | 2 +- pkg/streamformatter/streamformatter.go | 2 +- pkg/stringid/stringid.go | 2 +- pkg/stringutils/strslice.go | 2 +- pkg/symlink/fs_windows.go | 2 +- pkg/sysinfo/sysinfo.go | 2 +- pkg/system/utimes_linux.go | 2 +- pkg/tarsum/fileinfosums.go | 2 +- pkg/tarsum/tarsum.go | 4 ++-- pkg/term/term.go | 4 ++-- pkg/timeutils/utils.go | 2 +- pkg/useragent/useragent.go | 4 ++-- registry/auth.go | 2 +- registry/endpoint.go | 2 +- registry/session.go | 4 ++-- registry/types.go | 2 +- runconfig/config.go | 2 +- runconfig/config_unix.go | 2 +- runconfig/parse.go | 2 +- runconfig/parse_test.go | 2 +- volume/local/local.go | 4 ++-- volume/store/errors.go | 2 +- volume/store/store_windows.go | 2 +- volume/volume_windows.go | 2 +- 117 files changed, 159 insertions(+), 159 deletions(-) diff --git a/api/client/build.go b/api/client/build.go index 0516f5385f351..0b9472a0a14c9 100644 --- a/api/client/build.go +++ b/api/client/build.go @@ -145,7 +145,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error { // then make sure we send both files over to the daemon // because Dockerfile is, obviously, needed no matter what, and // .dockerignore is needed to know if either one needs to be - // removed. The deamon will remove them for us, if needed, after it + // removed. The daemon will remove them for us, if needed, after it // parses the Dockerfile. Ignore errors here, as they will have been // caught by ValidateContextDirectory above. var includes = []string{"."} diff --git a/api/client/cp.go b/api/client/cp.go index ab92689710450..0c3f19ffc64fa 100644 --- a/api/client/cp.go +++ b/api/client/cp.go @@ -231,7 +231,7 @@ func (cli *DockerCli) copyToContainer(srcPath, dstContainer, dstPath string, cpP // Ignore any error and assume that the parent directory of the destination // path exists, in which case the copy may still succeed. If there is any // type of conflict (e.g., non-directory overwriting an existing directory - // or vice versia) the extraction will fail. If the destination simply did + // or vice versa) the extraction will fail. If the destination simply did // not exist, but the parent directory does, the extraction will still // succeed. if err == nil { @@ -266,7 +266,7 @@ func (cli *DockerCli) copyToContainer(srcPath, dstContainer, dstPath string, cpP // With the stat info about the local source as well as the // destination, we have enough information to know whether we need to // alter the archive that we upload so that when the server extracts - // it to the specified directory in the container we get the disired + // it to the specified directory in the container we get the desired // copy behavior. // See comments in the implementation of `archive.PrepareArchiveCopy` diff --git a/api/client/network.go b/api/client/network.go index fae446cdb453d..b6e70f5f4db5b 100644 --- a/api/client/network.go +++ b/api/client/network.go @@ -130,7 +130,7 @@ func (cli *DockerCli) CmdNetworkDisconnect(args ...string) error { return cli.client.NetworkDisconnect(cmd.Arg(0), cmd.Arg(1)) } -// CmdNetworkLs lists all the netorks managed by docker daemon +// CmdNetworkLs lists all the networks managed by docker daemon // // Usage: docker network ls [OPTIONS] func (cli *DockerCli) CmdNetworkLs(args ...string) error { @@ -198,8 +198,8 @@ func (cli *DockerCli) CmdNetworkInspect(args ...string) error { // Consolidates the ipam configuration as a group from different related configurations // user can configure network with multiple non-overlapping subnets and hence it is -// possible to corelate the various related parameters and consolidate them. -// consoidateIpam consolidates subnets, ip-ranges, gateways and auxilary addresses into +// possible to correlate the various related parameters and consolidate them. +// consoidateIpam consolidates subnets, ip-ranges, gateways and auxiliary addresses into // structured ipam data. func consolidateIpam(subnets, ranges, gateways []string, auxaddrs map[string]string) ([]network.IPAMConfig, error) { if len(subnets) < len(ranges) || len(subnets) < len(gateways) { diff --git a/api/client/start.go b/api/client/start.go index 787f87d11808d..cdd364a11a0d2 100644 --- a/api/client/start.go +++ b/api/client/start.go @@ -100,7 +100,7 @@ func (cli *DockerCli) CmdStart(args ...string) error { return err } - // 4. Wait for attachement to break. + // 4. Wait for attachment to break. if c.Config.Tty && cli.isTerminalOut { if err := cli.monitorTtySize(containerID, false); err != nil { fmt.Fprintf(cli.err, "Error monitoring TTY size: %s\n", err) diff --git a/api/common.go b/api/common.go index 3a845028d8b36..3f9f81d8011a7 100644 --- a/api/common.go +++ b/api/common.go @@ -20,7 +20,7 @@ const ( // Version of Current REST API Version version.Version = "1.22" - // MinVersion represents Minimun REST API version supported + // MinVersion represents Minimum REST API version supported MinVersion version.Version = "1.12" // DefaultDockerfileName is the Default filename with Docker commands, read by docker build diff --git a/api/server/middleware.go b/api/server/middleware.go index 04944b99d2807..3bb64192750f6 100644 --- a/api/server/middleware.go +++ b/api/server/middleware.go @@ -139,7 +139,7 @@ func versionMiddleware(handler httputils.APIFunc) httputils.APIFunc { // handleWithGlobalMiddlwares wraps the handler function for a request with // the server's global middlewares. The order of the middlewares is backwards, -// meaning that the first in the list will be evaludated last. +// meaning that the first in the list will be evaluated last. // // Example: handleWithGlobalMiddlewares(s.getContainersName) // diff --git a/api/server/router/local/image.go b/api/server/router/local/image.go index 2ddc28610d738..3bba34a0d30a9 100644 --- a/api/server/router/local/image.go +++ b/api/server/router/local/image.go @@ -478,7 +478,7 @@ func (s *router) postBuild(ctx context.Context, w http.ResponseWriter, r *http.R func sanitizeRepoAndTags(names []string) ([]reference.Named, error) { var ( repoAndTags []reference.Named - // This map is used for deduplicating the "-t" paramter. + // This map is used for deduplicating the "-t" parameter. uniqNames = make(map[string]struct{}) ) for _, repo := range names { diff --git a/api/server/router/local/local.go b/api/server/router/local/local.go index ace1067246f74..2a3106aeec3bb 100644 --- a/api/server/router/local/local.go +++ b/api/server/router/local/local.go @@ -35,7 +35,7 @@ func (l localRoute) Path() string { return l.path } -// NewRoute initialies a new local route for the reouter +// NewRoute initializes a new local router for the reouter func NewRoute(method, path string, handler httputils.APIFunc) dkrouter.Route { return localRoute{method, path, handler} } diff --git a/api/types/stats.go b/api/types/stats.go index ecc144f6095d1..e21fe39c9d896 100644 --- a/api/types/stats.go +++ b/api/types/stats.go @@ -63,7 +63,7 @@ type BlkioStatEntry struct { // BlkioStats stores All IO service stats for data read and write // TODO Windows: This can be factored out type BlkioStats struct { - // number of bytes tranferred to and from the block device + // number of bytes transferred to and from the block device IoServiceBytesRecursive []BlkioStatEntry `json:"io_service_bytes_recursive"` IoServicedRecursive []BlkioStatEntry `json:"io_serviced_recursive"` IoQueuedRecursive []BlkioStatEntry `json:"io_queue_recursive"` diff --git a/builder/dockerfile/bflag.go b/builder/dockerfile/bflag.go index 24f73111ba186..c2e6c7dae0b2a 100644 --- a/builder/dockerfile/bflag.go +++ b/builder/dockerfile/bflag.go @@ -105,7 +105,7 @@ func (fl *Flag) IsTrue() bool { // compile time error so it doesn't matter too much when we stop our // processing as long as we do stop it, so this allows the code // around AddXXX() to be just: -// defFlag := AddString("desription", "") +// defFlag := AddString("description", "") // w/o needing to add an if-statement around each one. func (bf *BFlags) Parse() error { // If there was an error while defining the possible flags diff --git a/builder/dockerfile/dispatchers.go b/builder/dockerfile/dispatchers.go index e2d6f828f52e2..08f64f1ac37ee 100644 --- a/builder/dockerfile/dispatchers.go +++ b/builder/dockerfile/dispatchers.go @@ -640,7 +640,7 @@ func arg(b *Builder, args []string, attributes map[string]bool, original string) // If there is a default value associated with this arg then add it to the // b.buildArgs if one is not already passed to the builder. The args passed - // to builder override the defaut value of 'arg'. + // to builder override the default value of 'arg'. if _, ok := b.BuildArgs[name]; !ok && hasDefault { b.BuildArgs[name] = value } diff --git a/builder/dockerfile/evaluator.go b/builder/dockerfile/evaluator.go index 0080a9968bea9..2b3d2c829704f 100644 --- a/builder/dockerfile/evaluator.go +++ b/builder/dockerfile/evaluator.go @@ -4,7 +4,7 @@ // parser package for more information) that are yielded from the parser itself. // Calling NewBuilder with the BuildOpts struct can be used to customize the // experience for execution purposes only. Parsing is controlled in the parser -// package, and this division of resposibility should be respected. +// package, and this division of responsibility should be respected. // // Please see the jump table targets for the actual invocations, most of which // will call out to the functions in internals.go to deal with their tasks. diff --git a/builder/dockerfile/parser/parser_test.go b/builder/dockerfile/parser/parser_test.go index ee892cf9ac279..983a590a62098 100644 --- a/builder/dockerfile/parser/parser_test.go +++ b/builder/dockerfile/parser/parser_test.go @@ -70,7 +70,7 @@ func TestTestData(t *testing.T) { } if runtime.GOOS == "windows" { - // CRLF --> CR to match Unix behaviour + // CRLF --> CR to match Unix behavior content = bytes.Replace(content, []byte{'\x0d', '\x0a'}, []byte{'\x0a'}, -1) } diff --git a/cliconfig/config.go b/cliconfig/config.go index 0bcf87d87dfe5..f2dab3395ff71 100644 --- a/cliconfig/config.go +++ b/cliconfig/config.go @@ -71,7 +71,7 @@ type ConfigFile struct { filename string // Note: not serialized - for internal use only } -// NewConfigFile initilizes an empty configuration file for the given filename 'fn' +// NewConfigFile initializes an empty configuration file for the given filename 'fn' func NewConfigFile(fn string) *ConfigFile { return &ConfigFile{ AuthConfigs: make(map[string]AuthConfig), diff --git a/container/container.go b/container/container.go index d1f547f3f9d89..8285d3196ebb9 100644 --- a/container/container.go +++ b/container/container.go @@ -518,7 +518,7 @@ func (container *Container) AddMountPointWithVolume(destination string, vol volu } } -// IsDestinationMounted checkes whether a path is mounted on the container or not. +// IsDestinationMounted checks whether a path is mounted on the container or not. func (container *Container) IsDestinationMounted(destination string) bool { return container.MountPoints[destination] != nil } diff --git a/container/container_windows.go b/container/container_windows.go index 90b1bf4896e6b..683c59bb092bb 100644 --- a/container/container_windows.go +++ b/container/container_windows.go @@ -41,7 +41,7 @@ func (container *Container) IpcMounts() []execdriver.Mount { return nil } -// UnmountVolumes explicitely unmounts volumes from the container. +// UnmountVolumes explicitly unmounts volumes from the container. func (container *Container) UnmountVolumes(forceSyscall bool) error { return nil } diff --git a/container/monitor.go b/container/monitor.go index dd387aaa42ea0..3c29ba362e862 100644 --- a/container/monitor.go +++ b/container/monitor.go @@ -121,7 +121,7 @@ func (m *containerMonitor) ExitOnNext() { } // Close closes the container's resources such as networking allocations and -// unmounts the contatiner's root filesystem +// unmounts the container's root filesystem func (m *containerMonitor) Close() error { // Cleanup networking and mounts m.supervisor.Cleanup(m.container) diff --git a/contrib/download-frozen-image-v2.sh b/contrib/download-frozen-image-v2.sh index ca48646b97303..81b047561e0ec 100755 --- a/contrib/download-frozen-image-v2.sh +++ b/contrib/download-frozen-image-v2.sh @@ -56,13 +56,13 @@ while [ $# -gt 0 ]; do layersFs=$(echo "$manifestJson" | jq --raw-output '.fsLayers | .[] | .blobSum') IFS=$'\n' - # bash v4 on Windows CI requires CRLF seperator + # bash v4 on Windows CI requires CRLF separator if [ "$(go env GOHOSTOS)" = 'windows' ]; then major=$(echo ${BASH_VERSION%%[^0.9]} | cut -d. -f1) if [ "$major" -ge 4 ]; then IFS=$'\r\n' fi - fi + fi layers=( ${layersFs} ) unset IFS diff --git a/daemon/archive.go b/daemon/archive.go index 39429899a338f..de329741c20fa 100644 --- a/daemon/archive.go +++ b/daemon/archive.go @@ -20,7 +20,7 @@ import ( var ErrExtractPointNotDirectory = errors.New("extraction point is not a directory") // ContainerCopy performs a deprecated operation of archiving the resource at -// the specified path in the conatiner identified by the given name. +// the specified path in the container identified by the given name. func (daemon *Daemon) ContainerCopy(name string, res string) (io.ReadCloser, error) { container, err := daemon.GetContainer(name) if err != nil { diff --git a/daemon/create_windows.go b/daemon/create_windows.go index 5affc91d2f348..f150fcbab8e05 100644 --- a/daemon/create_windows.go +++ b/daemon/create_windows.go @@ -49,9 +49,9 @@ func (daemon *Daemon) createContainerPlatformSpecificSettings(container *contain // FIXME Windows: This code block is present in the Linux version and // allows the contents to be copied to the container FS prior to it - // being started. However, the function utilises the FollowSymLinkInScope + // being started. However, the function utilizes the FollowSymLinkInScope // path which does not cope with Windows volume-style file paths. There - // is a seperate effort to resolve this (@swernli), so this processing + // is a separate effort to resolve this (@swernli), so this processing // is deferred for now. A case where this would be useful is when // a dockerfile includes a VOLUME statement, but something is created // in that directory during the dockerfile processing. What this means diff --git a/daemon/debugtrap_windows.go b/daemon/debugtrap_windows.go index 4c47947ba1bc2..a981c1ea6fc0f 100644 --- a/daemon/debugtrap_windows.go +++ b/daemon/debugtrap_windows.go @@ -13,7 +13,7 @@ import ( func setupDumpStackTrap() { // Windows does not support signals like *nix systems. So instead of // trapping on SIGUSR1 to dump stacks, we wait on a Win32 event to be - // signalled. + // signaled. go func() { sa := syscall.SecurityAttributes{ Length: 0, diff --git a/daemon/execdriver/native/create.go b/daemon/execdriver/native/create.go index d0da544588573..0ef2ae6eeaa41 100644 --- a/daemon/execdriver/native/create.go +++ b/daemon/execdriver/native/create.go @@ -284,7 +284,7 @@ func (d *Driver) setupMounts(container *configs.Config, c *execdriver.Command) e userMounts[m.Destination] = struct{}{} } - // Filter out mounts that are overriden by user supplied mounts + // Filter out mounts that are overridden by user supplied mounts var defaultMounts []*configs.Mount _, mountDev := userMounts["/dev"] for _, m := range container.Mounts { diff --git a/daemon/graphdriver/btrfs/version_none.go b/daemon/graphdriver/btrfs/version_none.go index 7defec397b037..f802fbc6290e0 100644 --- a/daemon/graphdriver/btrfs/version_none.go +++ b/daemon/graphdriver/btrfs/version_none.go @@ -3,7 +3,7 @@ package btrfs // TODO(vbatts) remove this work-around once supported linux distros are on -// btrfs utililties of >= 3.16.1 +// btrfs utilities of >= 3.16.1 func btrfsBuildVersion() string { return "-" diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go index 46a0bcb9aa935..4d451cfde840b 100644 --- a/daemon/graphdriver/devmapper/deviceset.go +++ b/daemon/graphdriver/devmapper/deviceset.go @@ -766,7 +766,7 @@ func (devices *DeviceSet) createRegisterDevice(hash string) (*devInfo, error) { if err := devicemapper.CreateDevice(devices.getPoolDevName(), deviceID); err != nil { if devicemapper.DeviceIDExists(err) { // Device ID already exists. This should not - // happen. Now we have a mechianism to find + // happen. Now we have a mechanism to find // a free device ID. So something is not right. // Give a warning and continue. logrus.Errorf("Device ID %d exists in pool but it is supposed to be unused", deviceID) @@ -818,7 +818,7 @@ func (devices *DeviceSet) createRegisterSnapDevice(hash string, baseInfo *devInf if err := devicemapper.CreateSnapDevice(devices.getPoolDevName(), deviceID, baseInfo.Name(), baseInfo.DeviceID); err != nil { if devicemapper.DeviceIDExists(err) { // Device ID already exists. This should not - // happen. Now we have a mechianism to find + // happen. Now we have a mechanism to find // a free device ID. So something is not right. // Give a warning and continue. logrus.Errorf("Device ID %d exists in pool but it is supposed to be unused", deviceID) @@ -1749,7 +1749,7 @@ func (devices *DeviceSet) markForDeferredDeletion(info *devInfo) error { info.Deleted = true - // save device metadata to refelect deleted state. + // save device metadata to reflect deleted state. if err := devices.saveMetadata(info); err != nil { info.Deleted = false return err @@ -1759,7 +1759,7 @@ func (devices *DeviceSet) markForDeferredDeletion(info *devInfo) error { return nil } -// Should be caled with devices.Lock() held. +// Should be called with devices.Lock() held. func (devices *DeviceSet) deleteTransaction(info *devInfo, syncDelete bool) error { if err := devices.openTransaction(info.Hash, info.DeviceID); err != nil { logrus.Debugf("Error opening transaction hash = %s deviceId = %d", "", info.DeviceID) @@ -1805,7 +1805,7 @@ func (devices *DeviceSet) issueDiscard(info *devInfo) error { // This is a workaround for the kernel not discarding block so // on the thin pool when we remove a thinp device, so we do it // manually. - // Even if device is deferred deleted, activate it and isue + // Even if device is deferred deleted, activate it and issue // discards. if err := devices.activateDeviceIfNeeded(info, true); err != nil { return err @@ -2131,7 +2131,7 @@ func (devices *DeviceSet) UnmountDevice(hash, mountPath string) error { defer devices.Unlock() // If there are running containers when daemon crashes, during daemon - // restarting, it will kill running contaienrs and will finally call + // restarting, it will kill running containers and will finally call // Put() without calling Get(). So info.MountCount may become negative. // if info.mountCount goes negative, we do the unmount and assign // it to 0. diff --git a/daemon/graphdriver/devmapper/devmapper_doc.go b/daemon/graphdriver/devmapper/devmapper_doc.go index c1c3e3891b2ab..9ab3e4f8643d3 100644 --- a/daemon/graphdriver/devmapper/devmapper_doc.go +++ b/daemon/graphdriver/devmapper/devmapper_doc.go @@ -13,7 +13,7 @@ package devmapper // * version number of the interface that they were // * compiled with. // * -// * All recognised ioctl commands (ie. those that don't +// * All recognized ioctl commands (ie. those that don't // * return -ENOTTY) fill out this field, even if the // * command failed. // */ diff --git a/daemon/graphdriver/devmapper/driver.go b/daemon/graphdriver/devmapper/driver.go index 8a34f7e16ba04..c34319334c4c9 100644 --- a/daemon/graphdriver/devmapper/driver.go +++ b/daemon/graphdriver/devmapper/driver.go @@ -177,7 +177,7 @@ func (d *Driver) Get(id, mountLabel string) (string, error) { idFile := path.Join(mp, "id") if _, err := os.Stat(idFile); err != nil && os.IsNotExist(err) { - // Create an "id" file with the container/image id in it to help reconscruct this in case + // Create an "id" file with the container/image id in it to help reconstruct this in case // of later problems if err := ioutil.WriteFile(idFile, []byte(id), 0600); err != nil { d.DeviceSet.UnmountDevice(id, mp) diff --git a/daemon/graphdriver/driver.go b/daemon/graphdriver/driver.go index 4a6e67c9e0afd..649d0a4b707ce 100644 --- a/daemon/graphdriver/driver.go +++ b/daemon/graphdriver/driver.go @@ -17,14 +17,14 @@ import ( type FsMagic uint32 const ( - // FsMagicUnsupported is a predifined contant value other than a valid filesystem id. + // FsMagicUnsupported is a predefined constant value other than a valid filesystem id. FsMagicUnsupported = FsMagic(0x00000000) ) var ( // DefaultDriver if a storage driver is not specified. DefaultDriver string - // All registred drivers + // All registered drivers drivers map[string]InitFunc // ErrNotSupported returned when driver is not supported. @@ -120,7 +120,7 @@ func GetDriver(name, home string, options []string, uidMaps, gidMaps []idtools.I return nil, ErrNotSupported } -// getBuiltinDriver initalizes and returns the registered driver, but does not try to load from plugins +// getBuiltinDriver initializes and returns the registered driver, but does not try to load from plugins func getBuiltinDriver(name, home string, options []string, uidMaps, gidMaps []idtools.IDMap) (Driver, error) { if initFunc, exists := drivers[name]; exists { return initFunc(filepath.Join(home, name), options, uidMaps, gidMaps) diff --git a/daemon/graphdriver/overlay/overlay.go b/daemon/graphdriver/overlay/overlay.go index 211adeec8a409..67b9193005af3 100644 --- a/daemon/graphdriver/overlay/overlay.go +++ b/daemon/graphdriver/overlay/overlay.go @@ -30,7 +30,7 @@ var ( ErrApplyDiffFallback = fmt.Errorf("Fall back to normal ApplyDiff") ) -// ApplyDiffProtoDriver wraps the ProtoDriver by extending the inteface with ApplyDiff method. +// ApplyDiffProtoDriver wraps the ProtoDriver by extending the interface with ApplyDiff method. type ApplyDiffProtoDriver interface { graphdriver.ProtoDriver // ApplyDiff writes the diff to the archive for the given id and parent id. diff --git a/daemon/graphdriver/zfs/zfs.go b/daemon/graphdriver/zfs/zfs.go index 156f4cfa15c25..e0967983481af 100644 --- a/daemon/graphdriver/zfs/zfs.go +++ b/daemon/graphdriver/zfs/zfs.go @@ -31,7 +31,7 @@ func init() { graphdriver.Register("zfs", Init) } -// Logger returns a zfs logger implmentation. +// Logger returns a zfs logger implementation. type Logger struct{} // Log wraps log message from ZFS driver with a prefix '[zfs]'. diff --git a/daemon/kill.go b/daemon/kill.go index 06f63149551b0..0f962223c6bc1 100644 --- a/daemon/kill.go +++ b/daemon/kill.go @@ -105,7 +105,7 @@ func (daemon *Daemon) Kill(container *container.Container) error { return nil } -// killPossibleDeadProcess is a wrapper aroung killSig() suppressing "no such process" error. +// killPossibleDeadProcess is a wrapper around killSig() suppressing "no such process" error. func (daemon *Daemon) killPossiblyDeadProcess(container *container.Container, sig int) error { err := daemon.killWithSignal(container, sig) if err == syscall.ESRCH { diff --git a/daemon/list.go b/daemon/list.go index a0ede7b5b20ee..5bec6bd384f5d 100644 --- a/daemon/list.go +++ b/daemon/list.go @@ -266,7 +266,7 @@ func includeContainerInList(container *container.Container, ctx *listContext) it return excludeContainer } - // Stop interation when the container arrives to the filter container + // Stop iteration when the container arrives to the filter container if ctx.sinceFilter != nil { if container.ID == ctx.sinceFilter.ID { return stopIteration diff --git a/daemon/logger/fluentd/fluentd.go b/daemon/logger/fluentd/fluentd.go index 51e63d5236d6e..825de3a1ae15c 100644 --- a/daemon/logger/fluentd/fluentd.go +++ b/daemon/logger/fluentd/fluentd.go @@ -54,7 +54,7 @@ func New(ctx logger.Context) (logger.Logger, error) { } extra := ctx.ExtraAttributes(nil) logrus.Debugf("logging driver fluentd configured for container:%s, host:%s, port:%d, tag:%s, extra:%v.", ctx.ContainerID, host, port, tag, extra) - // logger tries to recoonect 2**32 - 1 times + // logger tries to reconnect 2**32 - 1 times // failed (and panic) after 204 years [ 1.5 ** (2**32 - 1) - 1 seconds] log, err := fluent.New(fluent.Config{FluentPort: port, FluentHost: host, RetryWait: 1000, MaxRetry: math.MaxInt32}) if err != nil { diff --git a/daemon/logger/jsonfilelog/read.go b/daemon/logger/jsonfilelog/read.go index 66c7b63da78e1..fd695c83dc2c7 100644 --- a/daemon/logger/jsonfilelog/read.go +++ b/daemon/logger/jsonfilelog/read.go @@ -146,7 +146,7 @@ func followLogs(f *os.File, logWatcher *logger.LogWatcher, notifyRotate chan int // io.ErrUnexpectedEOF is returned from json.Decoder when there is // remaining data in the parser's buffer while an io.EOF occurs. // If the json logger writes a partial json log entry to the disk - // while at the same time the decoder tries to decode it, the race codition happens. + // while at the same time the decoder tries to decode it, the race condition happens. if err == io.ErrUnexpectedEOF && retries <= maxJSONDecodeRetry { reader := io.MultiReader(dec.Buffered(), f) dec = json.NewDecoder(reader) diff --git a/daemon/logger/loggerutils/rotatefilewriter.go b/daemon/logger/loggerutils/rotatefilewriter.go index b66368030b3be..0d2553a13fdf0 100644 --- a/daemon/logger/loggerutils/rotatefilewriter.go +++ b/daemon/logger/loggerutils/rotatefilewriter.go @@ -32,7 +32,7 @@ func NewRotateFileWriter(logPath string, capacity int64, maxFiles int) (*RotateF }, nil } -//WriteLog write log messge to File +//WriteLog write log message to File func (w *RotateFileWriter) Write(message []byte) (int, error) { w.mu.Lock() defer w.mu.Unlock() @@ -106,7 +106,7 @@ func backup(fromPath, toPath string) error { return os.Rename(fromPath, toPath) } -// LogPath returns the location the given wirter logs to. +// LogPath returns the location the given writer logs to. func (w *RotateFileWriter) LogPath() string { return w.f.Name() } diff --git a/daemon/logger/splunk/splunk.go b/daemon/logger/splunk/splunk.go index 246302ffc660c..706478aa949bb 100644 --- a/daemon/logger/splunk/splunk.go +++ b/daemon/logger/splunk/splunk.go @@ -91,7 +91,7 @@ func New(ctx logger.Context) (logger.Logger, error) { tlsConfig := &tls.Config{} // Splunk is using autogenerated certificates by default, - // allow users to trust them with skiping verification + // allow users to trust them with skipping verification if insecureSkipVerifyStr, ok := ctx.Config[splunkInsecureSkipVerifyKey]; ok { insecureSkipVerify, err := strconv.ParseBool(insecureSkipVerifyStr) if err != nil { diff --git a/daemon/network.go b/daemon/network.go index 78459d2808789..53742faa07982 100644 --- a/daemon/network.go +++ b/daemon/network.go @@ -18,7 +18,7 @@ const ( ) // NetworkControllerEnabled checks if the networking stack is enabled. -// This feature depends on OS primitives and it's dissabled in systems like Windows. +// This feature depends on OS primitives and it's disabled in systems like Windows. func (daemon *Daemon) NetworkControllerEnabled() bool { return daemon.netController != nil } diff --git a/daemon/volumes.go b/daemon/volumes.go index 513c83d3cea44..d6b1ebbcef127 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -70,7 +70,7 @@ func (m mounts) parts(i int) int { // 1. Select the previously configured mount points for the containers, if any. // 2. Select the volumes mounted from another containers. Overrides previously configured mount point destination. // 3. Select the bind mounts set by the client. Overrides previously configured mount point destinations. -// 4. Cleanup old volumes that are about to be reasigned. +// 4. Cleanup old volumes that are about to be reassigned. func (daemon *Daemon) registerMountPoints(container *container.Container, hostConfig *runconfig.HostConfig) error { binds := map[string]bool{} mountPoints := map[string]*volume.MountPoint{} @@ -148,7 +148,7 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo container.Lock() - // 4. Cleanup old volumes that are about to be reasigned. + // 4. Cleanup old volumes that are about to be reassigned. for _, m := range mountPoints { if m.BackwardsCompatible() { if mp, exists := container.MountPoints[m.Destination]; exists && mp.Volume != nil { diff --git a/distribution/push.go b/distribution/push.go index 7e6cd6c4d632f..ba8e4190d178e 100644 --- a/distribution/push.go +++ b/distribution/push.go @@ -41,7 +41,7 @@ type ImagePushConfig struct { // MetadataStore is the storage backend for distribution-specific // metadata. MetadataStore metadata.Store - // LayerStore manges layers. + // LayerStore manages layers. LayerStore layer.Store // ImageStore manages images. ImageStore image.Store diff --git a/distribution/xfer/transfer.go b/distribution/xfer/transfer.go index c0ae3d1c4b1f1..7f323c1df5a41 100644 --- a/distribution/xfer/transfer.go +++ b/distribution/xfer/transfer.go @@ -61,7 +61,7 @@ type transfer struct { // running remains open as long as the transfer is in progress. running chan struct{} - // hasWatchers stays open until all watchers release the trasnfer. + // hasWatchers stays open until all watchers release the transfer. hasWatchers chan struct{} // broadcastDone is true if the master progress channel has closed. @@ -240,9 +240,9 @@ func (t *transfer) Cancel() { // DoFunc is a function called by the transfer manager to actually perform // a transfer. It should be non-blocking. It should wait until the start channel -// is closed before transfering any data. If the function closes inactive, that +// is closed before transferring any data. If the function closes inactive, that // signals to the transfer manager that the job is no longer actively moving -// data - for example, it may be waiting for a dependent tranfer to finish. +// data - for example, it may be waiting for a dependent transfer to finish. // This prevents it from taking up a slot. type DoFunc func(progressChan chan<- progress.Progress, start <-chan struct{}, inactive chan<- struct{}) Transfer diff --git a/docs/.gitignore b/docs/.gitignore index d22a3d702dc88..9ad7c6e2d1f3d 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1,2 @@ -# avoid commiting the awsconfig file used for releases +# avoid committing the awsconfig file used for releases awsconfig diff --git a/docs/articles/b2d_volume_resize.md b/docs/articles/b2d_volume_resize.md index a5bb82ed41174..68bba70415876 100644 --- a/docs/articles/b2d_volume_resize.md +++ b/docs/articles/b2d_volume_resize.md @@ -55,7 +55,7 @@ The `boot2docker` command reads its configuration from the `$BOOT2DOCKER_PROFILE The configuration shows you where `boot2docker` is looking for the `profile` file. It also output the settings that are in use. -2. Initialise a default file to customize using `boot2docker config > ~/.boot2docker/profile` command. +2. Initialize a default file to customize using `boot2docker config > ~/.boot2docker/profile` command. 3. Add the following lines to `$HOME/.boot2docker/profile`: diff --git a/docs/articles/systemd.md b/docs/articles/systemd.md index c839ff30d240e..4f86c5f994365 100644 --- a/docs/articles/systemd.md +++ b/docs/articles/systemd.md @@ -12,7 +12,7 @@ weight = 7 # Control and configure Docker with systemd Many Linux distributions use systemd to start the Docker daemon. This document -shows a few examples of how to customise Docker's settings. +shows a few examples of how to customize Docker's settings. ## Starting the Docker daemon diff --git a/docs/installation/SUSE.md b/docs/installation/SUSE.md index b4c11c22879a7..cc5cde07611b1 100644 --- a/docs/installation/SUSE.md +++ b/docs/installation/SUSE.md @@ -10,7 +10,7 @@ parent = "smn_linux" # openSUSE and SUSE Linux Enterprise -This page provides instructions for installing and configuring the lastest +This page provides instructions for installing and configuring the latest Docker Engine software on openSUSE and SUSE systems. >**Note:** You can also find bleeding edge Docker versions inside of the repositories maintained by the [Virtualization:containers project](https://build.opensuse.org/project/show/Virtualization:containers) on the [Open Build Service](https://build.opensuse.org/). This project delivers also other packages that are related with the Docker ecosystem (for example, Docker Compose). diff --git a/docs/reference/api/docker_remote_api.md b/docs/reference/api/docker_remote_api.md index 25bb790fb1e29..b6a7f59478d97 100644 --- a/docs/reference/api/docker_remote_api.md +++ b/docs/reference/api/docker_remote_api.md @@ -99,11 +99,11 @@ This section lists each version from latest to oldest. Each listing includes a * `GET /info` Now returns `Architecture` and `OSType` fields, providing information about the host architecture and operating system type that the daemon runs on. * `GET /networks/(name)` now returns a `Name` field for each container attached to the network. -* `GET /version` now returns the `BuildTime` field in RFC3339Nano format to make it +* `GET /version` now returns the `BuildTime` field in RFC3339Nano format to make it consistent with other date/time values returned by the API. * `AuthConfig` now supports a `registrytoken` for token based authentication * `POST /containers/create` now has a 4M minimum value limit for `HostConfig.KernelMemory` -* Pushes initated with `POST /images/(name)/push` and pulls initiated with `POST /images/create` +* Pushes initiated with `POST /images/(name)/push` and pulls initiated with `POST /images/create` will be cancelled if the HTTP connection making the API request is closed before the push or pull completes. diff --git a/docs/reference/commandline/events.md b/docs/reference/commandline/events.md index df88717385b9d..d0e299a69e58e 100644 --- a/docs/reference/commandline/events.md +++ b/docs/reference/commandline/events.md @@ -27,11 +27,11 @@ and Docker images will report: delete, import, pull, push, tag, untag -The `--since` and `--until` parameters can be Unix timestamps, date formated +The `--since` and `--until` parameters can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the client machine’s time. If you do not provide the --since option, the command returns only new and/or live events. Supported formats for date -formated time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`, +formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`, `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local timezone on the client will be used if you do not provide either a `Z` or a `+-00:00` timezone offset at the end of the timestamp. When providing Unix diff --git a/docs/userguide/storagedriver/btrfs-driver.md b/docs/userguide/storagedriver/btrfs-driver.md index 932431dbf230b..7f002df2943ab 100644 --- a/docs/userguide/storagedriver/btrfs-driver.md +++ b/docs/userguide/storagedriver/btrfs-driver.md @@ -101,7 +101,7 @@ ID 260 gen 11 top level 5 path btrfs/subvolumes/3c9a9d7cc6a235eb2de58ca9ef3551c6 ID 261 gen 12 top level 5 path btrfs/subvolumes/0a17decee4139b0de68478f149cc16346f5e711c5ae3bb969895f22dd6723751 ``` -Under the `/var/lib/docker/btrfs/subvolumes` directoy, each of these subvolumes and snapshots are visible as a normal Unix directory: +Under the `/var/lib/docker/btrfs/subvolumes` directory, each of these subvolumes and snapshots are visible as a normal Unix directory: ```bash $ ls -l /var/lib/docker/btrfs/subvolumes/ diff --git a/errors/daemon.go b/errors/daemon.go index 21fed03050873..c32ae2926b045 100644 --- a/errors/daemon.go +++ b/errors/daemon.go @@ -81,7 +81,7 @@ var ( HTTPStatusCode: http.StatusInternalServerError, }) - // ErrorCodeEmptyID is generated when an ID is the emptry string. + // ErrorCodeEmptyID is generated when an ID is the empty string. ErrorCodeEmptyID = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EMPTYID", Message: "Invalid empty id", diff --git a/experimental/plugins_graphdriver.md b/experimental/plugins_graphdriver.md index 700fdde13bc46..428cdb7750fb0 100644 --- a/experimental/plugins_graphdriver.md +++ b/experimental/plugins_graphdriver.md @@ -204,7 +204,7 @@ Respond with a string error if an error occurred. {} ``` -Perform neccessary tasks to release resources help by the plugin, for example +Perform necessary tasks to release resources help by the plugin, for example unmounting all the layered file systems. **Response**: diff --git a/experimental/userns.md b/experimental/userns.md index 5a204fa7cf583..cb713f7d65387 100644 --- a/experimental/userns.md +++ b/experimental/userns.md @@ -12,13 +12,13 @@ In this experimental phase, the Docker daemon creates a single daemon-wide mappi for all containers running on the same engine instance. The mappings will utilize the existing subordinate user and group ID feature available on all modern Linux distributions. -The [`/etc/subuid`](http://man7.org/linux/man-pages/man5/subuid.5.html) and +The [`/etc/subuid`](http://man7.org/linux/man-pages/man5/subuid.5.html) and [`/etc/subgid`](http://man7.org/linux/man-pages/man5/subgid.5.html) files will be -read for the user, and optional group, specified to the `--userns-remap` -parameter. If you do not wish to specify your own user and/or group, you can +read for the user, and optional group, specified to the `--userns-remap` +parameter. If you do not wish to specify your own user and/or group, you can provide `default` as the value to this flag, and a user will be created on your behalf and provided subordinate uid and gid ranges. This default user will be named -`dockremap`, and entries will be created for it in `/etc/passwd` and +`dockremap`, and entries will be created for it in `/etc/passwd` and `/etc/group` using your distro's standard user and group creation tools. > **Note**: The single mapping per-daemon restriction exists for this experimental @@ -43,7 +43,7 @@ values in the following formats: If numeric IDs are provided, translation back to valid user or group names will occur so that the subordinate uid and gid information can be read, given these resources are name-based, not id-based. If the numeric ID information -provided does not exist as entries in `/etc/passwd` or `/etc/group`, dameon +provided does not exist as entries in `/etc/passwd` or `/etc/group`, daemon startup will fail with an error message. *An example: starting with default Docker user management:* @@ -67,7 +67,7 @@ create the following range, based on an existing user already having the first > **Note:** On a fresh Fedora install, we found that we had to `touch` the > `/etc/subuid` and `/etc/subgid` files to have ranges assigned when users -> were created. Once these files existed, range assigment on user creation +> were created. Once these files existed, range assignment on user creation > worked properly. If you have a preferred/self-managed user with subordinate ID mappings already @@ -84,7 +84,7 @@ current experimental user namespace support. The simplest case exists where only one contiguous range is defined for the provided user or group. In this case, Docker will use that entire contiguous -range for the mapping of host uids and gids to the container process. This +range for the mapping of host uids and gids to the container process. This means that the first ID in the range will be the remapped root user, and the IDs above that initial ID will map host ID 1 through the end of the range. diff --git a/hack/make.sh b/hack/make.sh index 0f811a3adb637..95f4db090bb56 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -12,7 +12,7 @@ set -e # will be used as Docker binary version and package version. # - The hash of the git commit will also be included in the Docker binary, # with the suffix -dirty if the repository isn't clean. -# - The script is intented to be run inside the docker container specified +# - The script is intended to be run inside the docker container specified # in the Dockerfile at the root of the source. In other words: # DO NOT CALL THIS SCRIPT DIRECTLY. # - The right way to call this script is to invoke "make" from diff --git a/hack/release.sh b/hack/release.sh index 7b2ae7e89d814..c031ff8e40d06 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -225,7 +225,7 @@ release_build() { ;; arm) s3Arch=armel - # someday, we might potentially support mutliple GOARM values, in which case we might get armhf here too + # someday, we might potentially support multiple GOARM values, in which case we might get armhf here too ;; *) echo >&2 "error: can't convert $s3Arch to an appropriate value for 'uname -m'" diff --git a/image/fs_test.go b/image/fs_test.go index 0790b78e45582..35ea3c25ea905 100644 --- a/image/fs_test.go +++ b/image/fs_test.go @@ -268,7 +268,7 @@ func testGetSet(t *testing.T, store StoreBackend) { if err != nil { t.Fatal(err) } - // skipping use of digest pkg because its used by the imlementation + // skipping use of digest pkg because its used by the implementation h := sha256.New() _, err = h.Write(randomInput) if err != nil { diff --git a/image/image.go b/image/image.go index ed44ef377f52a..ee4a2884f9da2 100644 --- a/image/image.go +++ b/image/image.go @@ -96,7 +96,7 @@ type History struct { Author string `json:"author,omitempty"` // CreatedBy keeps the Dockerfile command used while building image. CreatedBy string `json:"created_by,omitempty"` - // Comment is custom mesage set by the user when creating the image. + // Comment is custom message set by the user when creating the image. Comment string `json:"comment,omitempty"` // EmptyLayer is set to true if this history item did not generate a // layer. Otherwise, the history item is associated with the next diff --git a/image/rootfs_unix.go b/image/rootfs_unix.go index e817db5184551..285d466b97545 100644 --- a/image/rootfs_unix.go +++ b/image/rootfs_unix.go @@ -6,7 +6,7 @@ import "github.com/docker/docker/layer" // RootFS describes images root filesystem // This is currently a placeholder that only supports layers. In the future -// this can be made into a interface that supports different implementaions. +// this can be made into a interface that supports different implementations. type RootFS struct { Type string `json:"type"` DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` diff --git a/image/rootfs_windows.go b/image/rootfs_windows.go index 6a2b179d45e06..45db04bfda8f7 100644 --- a/image/rootfs_windows.go +++ b/image/rootfs_windows.go @@ -12,7 +12,7 @@ import ( // RootFS describes images root filesystem // This is currently a placeholder that only supports layers. In the future -// this can be made into a interface that supports different implementaions. +// this can be made into a interface that supports different implementations. type RootFS struct { Type string `json:"type"` DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go index 6c3e36440b744..a0a8e7d699fde 100644 --- a/integration-cli/docker_api_attach_test.go +++ b/integration-cli/docker_api_attach_test.go @@ -137,7 +137,7 @@ func (s *DockerSuite) TestPostContainersAttach(c *check.C) { // Since the container only emits stdout, attaching to stderr should return nothing. expectTimeout(conn, br, "stdout") - // Test the simlar functions of the stderr stream. + // Test the similar functions of the stderr stream. cid, _ = dockerCmd(c, "run", "-di", "busybox", "/bin/sh", "-c", "cat >&2") cid = strings.TrimSpace(cid) conn, br, err = sockRequestHijack("POST", "/containers/"+cid+"/attach?stream=1&stdin=1&stderr=1", nil, "text/plain") diff --git a/integration-cli/docker_cli_attach_unix_test.go b/integration-cli/docker_cli_attach_unix_test.go index ea145105aa8e7..e5e7ab36665e6 100644 --- a/integration-cli/docker_cli_attach_unix_test.go +++ b/integration-cli/docker_cli_attach_unix_test.go @@ -35,7 +35,7 @@ func (s *DockerSuite) TestAttachClosedOnContainerStop(c *check.C) { errChan := make(chan error) go func() { defer close(errChan) - // Container is wating for us to signal it to stop + // Container is waiting for us to signal it to stop dockerCmd(c, "stop", id) // And wait for the attach command to end errChan <- attachCmd.Wait() diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index 8db301376d265..b540af51c8a2b 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -4612,7 +4612,7 @@ func (s *DockerSuite) TestBuildInvalidTag(c *check.C) { testRequires(c, DaemonIsLinux) name := "abcd:" + stringutils.GenerateRandomAlphaOnlyString(200) _, out, err := buildImageWithOut(name, "FROM scratch\nMAINTAINER quux\n", true) - // if the error doesnt check for illegal tag name, or the image is built + // if the error doesn't check for illegal tag name, or the image is built // then this should fail if !strings.Contains(out, "invalid reference format") || strings.Contains(out, "Sending build context to Docker daemon") { c.Fatalf("failed to stop before building. Error: %s, Output: %s", err, out) @@ -4817,7 +4817,7 @@ func (s *DockerSuite) TestBuildVerifySingleQuoteFails(c *check.C) { // This testcase is supposed to generate an error because the // JSON array we're passing in on the CMD uses single quotes instead // of double quotes (per the JSON spec). This means we interpret it - // as a "string" insead of "JSON array" and pass it on to "sh -c" and + // as a "string" instead of "JSON array" and pass it on to "sh -c" and // it should barf on it. name := "testbuildsinglequotefails" diff --git a/integration-cli/docker_cli_cp_to_container_test.go b/integration-cli/docker_cli_cp_to_container_test.go index c0db6ef1589d0..63fbd44665881 100644 --- a/integration-cli/docker_cli_cp_to_container_test.go +++ b/integration-cli/docker_cli_cp_to_container_test.go @@ -87,7 +87,7 @@ func (s *DockerSuite) TestCpToErrDstParentNotExists(c *check.C) { } // Test for error when DST ends in a trailing path separator but exists as a -// file. Also test that we cannot overwirite an existing directory with a +// file. Also test that we cannot overwrite an existing directory with a // non-directory and cannot overwrite an existing func (s *DockerSuite) TestCpToErrDstNotDir(c *check.C) { testRequires(c, DaemonIsLinux) diff --git a/integration-cli/docker_cli_images_test.go b/integration-cli/docker_cli_images_test.go index 9ed7762b0f149..d8211509299bf 100644 --- a/integration-cli/docker_cli_images_test.go +++ b/integration-cli/docker_cli_images_test.go @@ -171,7 +171,7 @@ func (s *DockerSuite) TestImagesEnsureDanglingImageOnlyListedOnce(c *check.C) { dockerCmd(c, "tag", "-f", "busybox", "foobox") out, _ = dockerCmd(c, "images", "-q", "-f", "dangling=true") - // Exect one dangling image + // Expect one dangling image c.Assert(strings.Count(out, imageID), checker.Equals, 1) } diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index 8fc0b7eef2278..d8db5216d6546 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -170,7 +170,7 @@ func (s *DockerNetworkSuite) SetUpSuite(c *check.C) { return } w.Header().Set("Content-Type", "application/vnd.docker.plugins.v1+json") - // make sure libnetwork is now asking to release the expected address fro mthe expected poolid + // make sure libnetwork is now asking to release the expected address from the expected poolid if addressRequest.PoolID != poolID { fmt.Fprintf(w, `{"Error":"unknown pool id"}`) } else if addressReleaseReq.Address != gw { @@ -429,7 +429,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkIpamMultipleNetworks(c *check.C) { assertNwIsAvailable(c, "test5") // test network with multiple subnets - // bridge network doesnt support multiple subnets. hence, use a dummy driver that supports + // bridge network doesn't support multiple subnets. hence, use a dummy driver that supports dockerCmd(c, "network", "create", "-d", dummyNetworkDriver, "--subnet=192.168.0.0/16", "--subnet=192.170.0.0/16", "test6") assertNwIsAvailable(c, "test6") @@ -491,7 +491,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkIpamInvalidCombinations(c *check.C _, _, err = dockerCmdWithError("network", "create", "--subnet=192.168.0.0/16", "--gateway=192.168.0.1", "--gateway=192.168.0.2", "test") c.Assert(err, check.NotNil) - // Multiple overlaping subnets in the same network must fail + // Multiple overlapping subnets in the same network must fail _, _, err = dockerCmdWithError("network", "create", "--subnet=192.168.0.0/16", "--subnet=192.168.1.0/16", "test") c.Assert(err, check.NotNil) diff --git a/integration-cli/docker_cli_port_test.go b/integration-cli/docker_cli_port_test.go index 38bfdacfe8bbd..0d9306f4ad790 100644 --- a/integration-cli/docker_cli_port_test.go +++ b/integration-cli/docker_cli_port_test.go @@ -223,7 +223,7 @@ func (s *DockerSuite) TestUnpublishedPortsInPsOutput(c *check.C) { // Cannot find expected port binding (expBnd2) in docker ps output c.Assert(out, checker.Contains, expBnd2) - // Remove container now otherwise it will interfeer with next test + // Remove container now otherwise it will interfere with next test stopRemoveContainer(id, c) // Run the container with explicit port bindings and no exposed ports @@ -236,7 +236,7 @@ func (s *DockerSuite) TestUnpublishedPortsInPsOutput(c *check.C) { c.Assert(out, checker.Contains, expBnd1) // Cannot find expected port binding (expBnd2) in docker ps output c.Assert(out, checker.Contains, expBnd2) - // Remove container now otherwise it will interfeer with next test + // Remove container now otherwise it will interfere with next test stopRemoveContainer(id, c) // Run the container with one unpublished exposed port and one explicit port binding diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 22ce9c1ae90ad..f8810dfc1190b 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -754,7 +754,7 @@ func (s *DockerSuite) TestRunContainerNetwork(c *check.C) { func (s *DockerSuite) TestRunNetHostNotAllowedWithLinks(c *check.C) { // TODO Windows: This is Linux specific as --link is not supported and - // this will be deprecated in favour of container networking model. + // this will be deprecated in favor of container networking model. testRequires(c, DaemonIsLinux, NotUserNamespace) dockerCmd(c, "run", "--name", "linked", "busybox", "true") diff --git a/integration-cli/docker_cli_volume_test.go b/integration-cli/docker_cli_volume_test.go index 6d49abe579204..13aade916d054 100644 --- a/integration-cli/docker_cli_volume_test.go +++ b/integration-cli/docker_cli_volume_test.go @@ -109,14 +109,14 @@ func (s *DockerSuite) TestVolumeCliLsFilterDangling(c *check.C) { out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=false") - // Same as above, but expicitly disabling dangling + // Same as above, but explicitly disabling dangling c.Assert(out, checker.Contains, "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output")) c.Assert(out, checker.Contains, "testisinuse1\n", check.Commentf("expected volume 'testisinuse1' in output")) c.Assert(out, checker.Contains, "testisinuse2\n", check.Commentf("expected volume 'testisinuse2' in output")) out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=true") - // Filter "dangling" volumes; ony "dangling" (unused) volumes should be in the output + // Filter "dangling" volumes; only "dangling" (unused) volumes should be in the output c.Assert(out, checker.Contains, "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output")) c.Assert(out, check.Not(checker.Contains), "testisinuse1\n", check.Commentf("volume 'testisinuse1' in output, but not expected")) c.Assert(out, check.Not(checker.Contains), "testisinuse2\n", check.Commentf("volume 'testisinuse2' in output, but not expected")) diff --git a/integration-cli/docker_test_vars.go b/integration-cli/docker_test_vars.go index de002071bcb6f..e87673693001f 100644 --- a/integration-cli/docker_test_vars.go +++ b/integration-cli/docker_test_vars.go @@ -30,7 +30,7 @@ var ( // daemonPlatform is held globally so that tests can make intelligent // decisions on how to configure themselves according to the platform - // of the daemon. This is initialised in docker_utils by sending + // of the daemon. This is initialized in docker_utils by sending // a version call to the daemon and examining the response header. daemonPlatform string diff --git a/integration-cli/docker_utils.go b/integration-cli/docker_utils.go index d0b54aa27cab9..5580032641af7 100644 --- a/integration-cli/docker_utils.go +++ b/integration-cli/docker_utils.go @@ -1416,7 +1416,7 @@ func newFakeGit(name string, files map[string]string, enforceLocalServer bool) ( return nil, fmt.Errorf("cannot start fake storage: %v", err) } } else { - // always start a local http server on CLI test machin + // always start a local http server on CLI test machine httpServer := httptest.NewServer(http.FileServer(http.Dir(root))) server = &localGitServer{httpServer} } @@ -1430,7 +1430,7 @@ func newFakeGit(name string, files map[string]string, enforceLocalServer bool) ( // Write `content` to the file at path `dst`, creating it if necessary, // as well as any missing directories. // The file is truncated if it already exists. -// Fail the test when error occures. +// Fail the test when error occurs. func writeFile(dst, content string, c *check.C) { // Create subdirectories if necessary c.Assert(os.MkdirAll(path.Dir(dst), 0700), check.IsNil) @@ -1443,7 +1443,7 @@ func writeFile(dst, content string, c *check.C) { } // Return the contents of file at path `src`. -// Fail the test when error occures. +// Fail the test when error occurs. func readFile(src string, c *check.C) (content string) { data, err := ioutil.ReadFile(src) c.Assert(err, check.IsNil) diff --git a/layer/layer.go b/layer/layer.go index d4533e4f5659d..73b922e3458b6 100644 --- a/layer/layer.go +++ b/layer/layer.go @@ -1,6 +1,6 @@ // Package layer is package for managing read only // and read-write mounts on the union file system -// driver. Read-only mounts are refenced using a +// driver. Read-only mounts are referenced using a // content hash and are protected from mutation in // the exposed interface. The tar format is used // to create read only layers and export both @@ -189,7 +189,7 @@ type MetadataStore interface { GetInitID(string) (string, error) GetMountParent(string) (ChainID, error) - // List returns the full list of referened + // List returns the full list of referenced // read-only and read-write layers List() ([]ChainID, []string, error) diff --git a/layer/layer_store.go b/layer/layer_store.go index 701dd7624461a..a5f9523d3fc31 100644 --- a/layer/layer_store.go +++ b/layer/layer_store.go @@ -418,7 +418,7 @@ func (ls *layerStore) saveMount(mount *mountedLayer) error { func (ls *layerStore) initMount(graphID, parent, mountLabel string, initFunc MountInit) (string, error) { // Use "-init" to maintain compatibility with graph drivers // which are expecting this layer with this special name. If all - // graph drivers can be updated to not rely on knowin about this layer + // graph drivers can be updated to not rely on knowing about this layer // then the initID should be randomly generated. initID := fmt.Sprintf("%s-init", graphID) diff --git a/man/docker-events.1.md b/man/docker-events.1.md index bf0eda92ebbfd..fb8d7b00b8e24 100644 --- a/man/docker-events.1.md +++ b/man/docker-events.1.md @@ -37,11 +37,11 @@ and Docker images will report: **--until**="" Stream events until this timestamp -The `--since` and `--until` parameters can be Unix timestamps, date formated +The `--since` and `--until` parameters can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the client machine’s time. If you do not provide the --since option, the command returns only new and/or live events. Supported formats for date -formated time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`, +formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`, `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local timezone on the client will be used if you do not provide either a `Z` or a `+-00:00` timezone offset at the end of the timestamp. When providing Unix @@ -49,7 +49,7 @@ timestamps enter seconds[.nanoseconds], where seconds is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a fraction of a second no more than nine digits long. - + # EXAMPLES ## Listening for Docker events diff --git a/man/docker-ps.1.md b/man/docker-ps.1.md index cee553a237cfa..82a4ea20d544e 100644 --- a/man/docker-ps.1.md +++ b/man/docker-ps.1.md @@ -48,7 +48,7 @@ the running containers. .Ports - Exposed ports. .Status - Container status. .Size - Container disk size. - .Labels - All labels asigned to the container. + .Labels - All labels assigned to the container. .Label - Value of a specific label for this container. For example `{{.Label "com.docker.swarm.cpu"}}` **--help** diff --git a/opts/envfile_test.go b/opts/envfile_test.go index a172267b5bbb4..a2e2200fa1bc4 100644 --- a/opts/envfile_test.go +++ b/opts/envfile_test.go @@ -106,7 +106,7 @@ func TestParseEnvFileBadlyFormattedFile(t *testing.T) { } } -// Test ParseEnvFile for a file with a line exeeding bufio.MaxScanTokenSize +// Test ParseEnvFile for a file with a line exceeding bufio.MaxScanTokenSize func TestParseEnvFileLineTooLongFile(t *testing.T) { content := strings.Repeat("a", bufio.MaxScanTokenSize+42) content = fmt.Sprint("foo=", content) diff --git a/opts/ip.go b/opts/ip.go index d787b56ca6a08..c7b0dc99473a3 100644 --- a/opts/ip.go +++ b/opts/ip.go @@ -22,7 +22,7 @@ func NewIPOpt(ref *net.IP, defaultVal string) *IPOpt { } // Set sets an IPv4 or IPv6 address from a given string. If the given -// string is not parsable as an IP address it returns an error. +// string is not parseable as an IP address it returns an error. func (o *IPOpt) Set(val string) error { ip := net.ParseIP(val) if ip == nil { diff --git a/pkg/archive/archive.go b/pkg/archive/archive.go index 0da65828b8ec0..1281683ee474f 100644 --- a/pkg/archive/archive.go +++ b/pkg/archive/archive.go @@ -31,7 +31,7 @@ type ( Archive io.ReadCloser // Reader is a type of io.Reader. Reader io.Reader - // Compression is the state represtents if compressed or not. + // Compression is the state represents if compressed or not. Compression int // TarChownOptions wraps the chown options UID and GID. TarChownOptions struct { diff --git a/pkg/archive/archive_unix.go b/pkg/archive/archive_unix.go index abf9ad7802eae..fbc3bb8c4d1b1 100644 --- a/pkg/archive/archive_unix.go +++ b/pkg/archive/archive_unix.go @@ -19,7 +19,7 @@ func fixVolumePathPrefix(srcPath string) string { } // getWalkRoot calculates the root path when performing a TarWithOptions. -// We use a seperate function as this is platform specific. On Linux, we +// We use a separate function as this is platform specific. On Linux, we // can't use filepath.Join(srcPath,include) because this will clean away // a trailing "." or "/" which may be important. func getWalkRoot(srcPath string, include string) string { diff --git a/pkg/archive/archive_windows.go b/pkg/archive/archive_windows.go index b348cde6a0c5a..5c3a1be3401d5 100644 --- a/pkg/archive/archive_windows.go +++ b/pkg/archive/archive_windows.go @@ -19,7 +19,7 @@ func fixVolumePathPrefix(srcPath string) string { } // getWalkRoot calculates the root path when performing a TarWithOptions. -// We use a seperate function as this is platform specific. +// We use a separate function as this is platform specific. func getWalkRoot(srcPath string, include string) string { return filepath.Join(srcPath, include) } diff --git a/pkg/archive/changes.go b/pkg/archive/changes.go index e0bd4c461e169..81651c61d62a9 100644 --- a/pkg/archive/changes.go +++ b/pkg/archive/changes.go @@ -150,7 +150,7 @@ func Changes(layers []string, rw string) ([]Change, error) { // If /foo/bar/file.txt is modified, then /foo/bar must be part of the changed files. // This block is here to ensure the change is recorded even if the - // modify time, mode and size of the parent directoriy in the rw and ro layers are all equal. + // modify time, mode and size of the parent directory in the rw and ro layers are all equal. // Check https://github.com/docker/docker/pull/13590 for details. if f.IsDir() { changedDirs[path] = struct{}{} diff --git a/pkg/archive/whiteouts.go b/pkg/archive/whiteouts.go index 3d9c3132135c4..d20478a10dc15 100644 --- a/pkg/archive/whiteouts.go +++ b/pkg/archive/whiteouts.go @@ -9,7 +9,7 @@ package archive const WhiteoutPrefix = ".wh." // WhiteoutMetaPrefix prefix means whiteout has a special meaning and is not -// for remoing an actaul file. Normally these files are excluded from exported +// for removing an actual file. Normally these files are excluded from exported // archives. const WhiteoutMetaPrefix = WhiteoutPrefix + WhiteoutPrefix diff --git a/pkg/devicemapper/attach_loopback.go b/pkg/devicemapper/attach_loopback.go index 6670bd4667967..30e0a4871b2a6 100644 --- a/pkg/devicemapper/attach_loopback.go +++ b/pkg/devicemapper/attach_loopback.go @@ -87,7 +87,7 @@ func openNextAvailableLoopback(index int, sparseFile *os.File) (loopFile *os.Fil func AttachLoopDevice(sparseName string) (loop *os.File, err error) { // Try to retrieve the next available loopback device via syscall. - // If it fails, we discard error and start loopking for a + // If it fails, we discard error and start looping for a // loopback from index 0. startIndex, err := getNextFreeLoopbackIndex() if err != nil { diff --git a/pkg/discovery/kv/kv_test.go b/pkg/discovery/kv/kv_test.go index 2475e3304db07..a5133093b6a6b 100644 --- a/pkg/discovery/kv/kv_test.go +++ b/pkg/discovery/kv/kv_test.go @@ -290,7 +290,7 @@ func (s *FakeStore) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVP } // WatchTree will fail the first time, and return the mockKVchan afterwards. -// This is the behaviour we need for testing.. If we need 'moar', should update this. +// This is the behavior we need for testing.. If we need 'moar', should update this. func (s *FakeStore) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error) { if s.watchTreeCallCount == 0 { s.watchTreeCallCount = 1 diff --git a/pkg/filenotify/filenotify.go b/pkg/filenotify/filenotify.go index e042c6bba4a93..23befae6789c0 100644 --- a/pkg/filenotify/filenotify.go +++ b/pkg/filenotify/filenotify.go @@ -1,6 +1,6 @@ // Package filenotify provides a mechanism for watching file(s) for changes. // Generally leans on fsnotify, but provides a poll-based notifier which fsnotify does not support. -// These are wrapped up in a common interface so that either can be used interchangably in your code. +// These are wrapped up in a common interface so that either can be used interchangeably in your code. package filenotify import "gopkg.in/fsnotify.v1" diff --git a/pkg/filenotify/poller.go b/pkg/filenotify/poller.go index a55266d0e5e5e..0d92afd4cb2a3 100644 --- a/pkg/filenotify/poller.go +++ b/pkg/filenotify/poller.go @@ -24,7 +24,7 @@ const watchWaitTime = 200 * time.Millisecond // filePoller is used to poll files for changes, especially in cases where fsnotify // can't be run (e.g. when inotify handles are exhausted) -// filePoller satifies the FileWatcher interface +// filePoller satisfies the FileWatcher interface type filePoller struct { // watches is the list of files currently being polled, close the associated channel to stop the watch watches map[string]chan struct{} diff --git a/pkg/fileutils/fileutils.go b/pkg/fileutils/fileutils.go index 3fdf6922890df..b5057ecd12905 100644 --- a/pkg/fileutils/fileutils.go +++ b/pkg/fileutils/fileutils.go @@ -78,7 +78,7 @@ func Matches(file string, patterns []string) (bool, error) { // OptimizedMatches is basically the same as fileutils.Matches() but optimized for archive.go. // It will assume that the inputs have been preprocessed and therefore the function -// doen't need to do as much error checking and clean-up. This was done to avoid +// doesn't need to do as much error checking and clean-up. This was done to avoid // repeating these steps on each file being checked during the archive process. // The more generic fileutils.Matches() can't make these assumptions. func OptimizedMatches(file string, patterns []string, patDirs [][]string) (bool, error) { diff --git a/pkg/integration/utils.go b/pkg/integration/utils.go index 330a5339046ef..48c33b6a55e79 100644 --- a/pkg/integration/utils.go +++ b/pkg/integration/utils.go @@ -295,7 +295,7 @@ func ConsumeWithSpeed(reader io.Reader, chunkSize int, interval time.Duration, s } } -// ParseCgroupPaths arses 'procCgroupData', which is output of '/proc//cgroup', and returns +// ParseCgroupPaths parses 'procCgroupData', which is output of '/proc//cgroup', and returns // a map which cgroup name as key and path as value. func ParseCgroupPaths(procCgroupData string) map[string]string { cgroupPaths := map[string]string{} @@ -337,7 +337,7 @@ func (c *ChannelBuffer) ReadTimeout(p []byte, n time.Duration) (int, error) { } } -// RunAtDifferentDate runs the specifed function with the given time. +// RunAtDifferentDate runs the specified function with the given time. // It changes the date of the system, which can led to weird behaviors. func RunAtDifferentDate(date time.Time, block func()) { // Layout for date. MMDDhhmmYYYY diff --git a/pkg/integration/utils_test.go b/pkg/integration/utils_test.go index 7c5df4e90a97e..b2c5849796d48 100644 --- a/pkg/integration/utils_test.go +++ b/pkg/integration/utils_test.go @@ -309,7 +309,7 @@ func TestCompareDirectoryEntries(t *testing.T) { } } -// FIXME make an "unhappy path" test for ListTar without "panicing" :-) +// FIXME make an "unhappy path" test for ListTar without "panicking" :-) func TestListTar(t *testing.T) { tmpFolder, err := ioutil.TempDir("", "integration-cli-utils-list-tar") if err != nil { diff --git a/pkg/ioutils/writers.go b/pkg/ioutils/writers.go index 7a3249f3a0fe2..ccc7f9c23e0f4 100644 --- a/pkg/ioutils/writers.go +++ b/pkg/ioutils/writers.go @@ -20,7 +20,7 @@ func NopWriteCloser(w io.Writer) io.WriteCloser { return &nopWriteCloser{w} } -// NopFlusher represents a type which flush opetatin is nop. +// NopFlusher represents a type which flush operation is nop. type NopFlusher struct{} // Flush is a nop operation. diff --git a/pkg/jsonlog/jsonlog.go b/pkg/jsonlog/jsonlog.go index 9a717698ea9ab..422e4bbd92b25 100644 --- a/pkg/jsonlog/jsonlog.go +++ b/pkg/jsonlog/jsonlog.go @@ -19,8 +19,8 @@ type JSONLog struct { // Format returns the log formatted according to format // If format is nil, returns the log message -// If format is json, returns the log marshalled in json format -// By defalut, returns the log with the log time formatted according to format. +// If format is json, returns the log marshaled in json format +// By default, returns the log with the log time formatted according to format. func (jl *JSONLog) Format(format string) (string, error) { if format == "" { return jl.Log, nil diff --git a/pkg/jsonmessage/jsonmessage.go b/pkg/jsonmessage/jsonmessage.go index e20b2420c2446..c234ff6804817 100644 --- a/pkg/jsonmessage/jsonmessage.go +++ b/pkg/jsonmessage/jsonmessage.go @@ -60,7 +60,7 @@ func (p *JSONProgress) String() string { percentage = 50 } if width > 110 { - // this number can't be negetive gh#7136 + // this number can't be negative gh#7136 numSpaces := 0 if 50-percentage > 0 { numSpaces = 50 - percentage @@ -106,7 +106,7 @@ type JSONMessage struct { // Display displays the JSONMessage to `out`. `isTerminal` describes if `out` // is a terminal. If this is the case, it will erase the entire current line -// when dislaying the progressbar. +// when displaying the progressbar. func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error { if jm.Error != nil { if jm.Error.Code == 401 { diff --git a/pkg/locker/locker.go b/pkg/locker/locker.go index e4984bac96526..0b22ddfab85c6 100644 --- a/pkg/locker/locker.go +++ b/pkg/locker/locker.go @@ -41,7 +41,7 @@ func (l *lockCtr) inc() { atomic.AddInt32(&l.waiters, 1) } -// dec decrements the number of waiters wating on the lock +// dec decrements the number of waiters waiting on the lock func (l *lockCtr) dec() { atomic.AddInt32(&l.waiters, -1) } diff --git a/pkg/mflag/flag.go b/pkg/mflag/flag.go index d430f13a2b64e..ddcd62c1c7c03 100644 --- a/pkg/mflag/flag.go +++ b/pkg/mflag/flag.go @@ -1228,7 +1228,7 @@ func (v mergeVal) IsBoolFlag() bool { // Merge is an helper function that merges n FlagSets into a single dest FlagSet // In case of name collision between the flagsets it will apply -// the destination FlagSet's errorHandling behaviour. +// the destination FlagSet's errorHandling behavior. func Merge(dest *FlagSet, flagsets ...*FlagSet) error { for _, fset := range flagsets { for k, f := range fset.formal { diff --git a/pkg/mount/flags_linux.go b/pkg/mount/flags_linux.go index 2f9f5c58ee5d8..dc696dce90752 100644 --- a/pkg/mount/flags_linux.go +++ b/pkg/mount/flags_linux.go @@ -23,7 +23,7 @@ const ( SYNCHRONOUS = syscall.MS_SYNCHRONOUS // DIRSYNC will force all directory updates within the file system to be done - // synchronously. This affects the following system calls: creat, link, + // synchronously. This affects the following system calls: create, link, // unlink, symlink, mkdir, rmdir, mknod and rename. DIRSYNC = syscall.MS_DIRSYNC diff --git a/pkg/mount/sharedsubtree_linux_test.go b/pkg/mount/sharedsubtree_linux_test.go index 4a8d22f02f787..c1837942e3a98 100644 --- a/pkg/mount/sharedsubtree_linux_test.go +++ b/pkg/mount/sharedsubtree_linux_test.go @@ -168,7 +168,7 @@ func TestSubtreeShared(t *testing.T) { } }() - // NOW, check that the file from the outside directory is avaible in the source directory + // NOW, check that the file from the outside directory is available in the source directory if _, err := os.Stat(sourceCheckPath); err != nil { t.Fatal(err) } diff --git a/pkg/parsers/filters/parse.go b/pkg/parsers/filters/parse.go index 7444201faef35..6c423ceae80c5 100644 --- a/pkg/parsers/filters/parse.go +++ b/pkg/parsers/filters/parse.go @@ -128,7 +128,7 @@ func (filters Args) Len() int { return len(filters.fields) } -// MatchKVList returns true if the values for the specified field maches the ones +// MatchKVList returns true if the values for the specified field matches the ones // from the sources. // e.g. given Args are {'label': {'label1=1','label2=1'}, 'image.name', {'ubuntu'}}, // field is 'label' and sources are {'label1': '1', 'label2': '2'} diff --git a/pkg/random/random.go b/pkg/random/random.go index e560aff11136d..70de4d1304c54 100644 --- a/pkg/random/random.go +++ b/pkg/random/random.go @@ -10,7 +10,7 @@ import ( "time" ) -// Rand is a global *rand.Rand instance, which initilized with NewSource() source. +// Rand is a global *rand.Rand instance, which initialized with NewSource() source. var Rand = rand.New(NewSource()) // Reader is a global, shared instance of a pseudorandom bytes generator. diff --git a/pkg/reexec/reexec.go b/pkg/reexec/reexec.go index 20491e05d6813..ceb98d25fc990 100644 --- a/pkg/reexec/reexec.go +++ b/pkg/reexec/reexec.go @@ -41,7 +41,7 @@ func naiveSelf() string { if absName, err := filepath.Abs(name); err == nil { return absName } - // if we coudn't get absolute name, return original + // if we couldn't get absolute name, return original // (NOTE: Go only errors on Abs() if os.Getwd fails) return name } diff --git a/pkg/streamformatter/streamformatter.go b/pkg/streamformatter/streamformatter.go index b67a53d648ac4..d6700184c1906 100644 --- a/pkg/streamformatter/streamformatter.go +++ b/pkg/streamformatter/streamformatter.go @@ -54,7 +54,7 @@ func (sf *StreamFormatter) FormatStatus(id, format string, a ...interface{}) []b return []byte(str + streamNewline) } -// FormatError formats the specifed error. +// FormatError formats the specified error. func (sf *StreamFormatter) FormatError(err error) []byte { if sf.json { jsonError, ok := err.(*jsonmessage.JSONError) diff --git a/pkg/stringid/stringid.go b/pkg/stringid/stringid.go index 0332da6676c36..02d2594e1a6ef 100644 --- a/pkg/stringid/stringid.go +++ b/pkg/stringid/stringid.go @@ -48,7 +48,7 @@ func generateID(crypto bool) string { } id := hex.EncodeToString(b) // if we try to parse the truncated for as an int and we don't have - // an error then the value is all numberic and causes issues when + // an error then the value is all numeric and causes issues when // used as a hostname. ref #3869 if _, err := strconv.ParseInt(TruncateID(id), 10, 64); err == nil { continue diff --git a/pkg/stringutils/strslice.go b/pkg/stringutils/strslice.go index 4055754026eab..dfe535edd7d1d 100644 --- a/pkg/stringutils/strslice.go +++ b/pkg/stringutils/strslice.go @@ -5,7 +5,7 @@ import ( "strings" ) -// StrSlice representes a string or an array of strings. +// StrSlice represents a string or an array of strings. // We need to override the json decoder to accept both options. type StrSlice struct { parts []string diff --git a/pkg/symlink/fs_windows.go b/pkg/symlink/fs_windows.go index 29bd4568864d7..70988a37e6146 100644 --- a/pkg/symlink/fs_windows.go +++ b/pkg/symlink/fs_windows.go @@ -91,7 +91,7 @@ func walkSymlinks(path string) (string, error) { return "", errors.New("EvalSymlinks: too many links in " + originalPath) } - // A path beginnging with `\\?\` represents the root, so automatically + // A path beginning with `\\?\` represents the root, so automatically // skip that part and begin processing the next segment. if strings.HasPrefix(path, longpath.Prefix) { b.WriteString(longpath.Prefix) diff --git a/pkg/sysinfo/sysinfo.go b/pkg/sysinfo/sysinfo.go index c12619f577c76..3c7e9edb73cfe 100644 --- a/pkg/sysinfo/sysinfo.go +++ b/pkg/sysinfo/sysinfo.go @@ -36,7 +36,7 @@ type cgroupMemInfo struct { // Whether soft limit is supported or not MemoryReservation bool - // Whether OOM killer disalbe is supported or not + // Whether OOM killer disable is supported or not OomKillDisable bool // Whether memory swappiness is supported or not diff --git a/pkg/system/utimes_linux.go b/pkg/system/utimes_linux.go index 007bfa8c03314..fc8a1aba95cb1 100644 --- a/pkg/system/utimes_linux.go +++ b/pkg/system/utimes_linux.go @@ -5,7 +5,7 @@ import ( "unsafe" ) -// LUtimesNano is used to change access and modification time of the speficied path. +// LUtimesNano is used to change access and modification time of the specified path. // It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm. func LUtimesNano(path string, ts []syscall.Timespec) error { // These are not currently available in syscall diff --git a/pkg/tarsum/fileinfosums.go b/pkg/tarsum/fileinfosums.go index 7c2161c246357..5abf5e7ba39e6 100644 --- a/pkg/tarsum/fileinfosums.go +++ b/pkg/tarsum/fileinfosums.go @@ -4,7 +4,7 @@ import "sort" // FileInfoSumInterface provides an interface for accessing file checksum // information within a tar file. This info is accessed through interface -// so the actual name and sum cannot be medled with. +// so the actual name and sum cannot be melded with. type FileInfoSumInterface interface { // File name Name() string diff --git a/pkg/tarsum/tarsum.go b/pkg/tarsum/tarsum.go index 0f5783be1ba43..4dc89bd4150f4 100644 --- a/pkg/tarsum/tarsum.go +++ b/pkg/tarsum/tarsum.go @@ -146,7 +146,7 @@ var ( } ) -// DefaultTHash is default TarSum hashing algoritm - "sha256". +// DefaultTHash is default TarSum hashing algorithm - "sha256". var DefaultTHash = NewTHash("sha256", sha256.New) type simpleTHash struct { @@ -261,7 +261,7 @@ func (ts *tarSum) Read(buf []byte) (int, error) { return 0, err } - // Filling the tar writter + // Filling the tar writer if _, err = ts.tarW.Write(buf2[:n]); err != nil { return 0, err } diff --git a/pkg/term/term.go b/pkg/term/term.go index 7912ae43e3b8a..316c3990537c8 100644 --- a/pkg/term/term.go +++ b/pkg/term/term.go @@ -51,7 +51,7 @@ func GetFdInfo(in interface{}) (uintptr, bool) { func GetWinsize(fd uintptr) (*Winsize, error) { ws := &Winsize{} _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(ws))) - // Skipp errno = 0 + // Skip errno = 0 if err == 0 { return ws, nil } @@ -61,7 +61,7 @@ func GetWinsize(fd uintptr) (*Winsize, error) { // SetWinsize tries to set the specified window size for the specified file descriptor. func SetWinsize(fd uintptr, ws *Winsize) error { _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(syscall.TIOCSWINSZ), uintptr(unsafe.Pointer(ws))) - // Skipp errno = 0 + // Skip errno = 0 if err == 0 { return nil } diff --git a/pkg/timeutils/utils.go b/pkg/timeutils/utils.go index 7502e885533ca..077d091f0b0c7 100644 --- a/pkg/timeutils/utils.go +++ b/pkg/timeutils/utils.go @@ -44,7 +44,7 @@ func GetTimestamp(value string, reference time.Time) (string, error) { // we want the number of colons in the T portion of the timestamp tcolons := strings.Count(value, ":") // if parseInLocation is off and we have a +/- zone offset (not Z) then - // there will be an extra colon in the input for the tz offset subract that + // there will be an extra colon in the input for the tz offset subtract that // colon from the tcolons count if !parseInLocation && !strings.ContainsAny(value, "zZ") && tcolons > 0 { tcolons-- diff --git a/pkg/useragent/useragent.go b/pkg/useragent/useragent.go index a410974835fc6..1137db51b8950 100644 --- a/pkg/useragent/useragent.go +++ b/pkg/useragent/useragent.go @@ -29,8 +29,8 @@ func (vi *VersionInfo) isValid() bool { // // Each VersionInfo will be converted to a string in the format of // "product/version", where the "product" is get from the name field, while -// version is get from the version field. Several pieces of verson information -// will be concatinated and separated by space. +// version is get from the version field. Several pieces of version information +// will be concatenated and separated by space. // // Example: // AppendVersions("base", VersionInfo{"foo", "1.0"}, VersionInfo{"bar", "2.0"}) diff --git a/registry/auth.go b/registry/auth.go index c3f09a424c64b..e21ee4bc88ed1 100644 --- a/registry/auth.go +++ b/registry/auth.go @@ -38,7 +38,7 @@ func loginV1(authConfig *cliconfig.AuthConfig, registryEndpoint *Endpoint) (stri loginAgainstOfficialIndex := serverAddress == IndexServer - // to avoid sending the server address to the server it should be removed before being marshalled + // to avoid sending the server address to the server it should be removed before being marshaled authCopy := *authConfig authCopy.ServerAddress = "" diff --git a/registry/endpoint.go b/registry/endpoint.go index 20805767c686e..72892a99f8eeb 100644 --- a/registry/endpoint.go +++ b/registry/endpoint.go @@ -125,7 +125,7 @@ type Endpoint struct { URLBuilder *v2.URLBuilder } -// Get the formated URL for the root of this registry Endpoint +// Get the formatted URL for the root of this registry Endpoint func (e *Endpoint) String() string { return fmt.Sprintf("%s/v%d/", e.URL, e.Version) } diff --git a/registry/session.go b/registry/session.go index 5017aeacacbd0..cecf936b26573 100644 --- a/registry/session.go +++ b/registry/session.go @@ -100,8 +100,8 @@ func (tr *authTransport) RoundTrip(orig *http.Request) (*http.Response, error) { // Authorization should not be set on 302 redirect for untrusted locations. // This logic mirrors the behavior in addRequiredHeadersToRedirectedRequests. // As the authorization logic is currently implemented in RoundTrip, - // a 302 redirect is detected by looking at the Referer header as go http package adds said header. - // This is safe as Docker doesn't set Referer in other scenarios. + // a 302 redirect is detected by looking at the Referrer header as go http package adds said header. + // This is safe as Docker doesn't set Referrer in other scenarios. if orig.Header.Get("Referer") != "" && !trustedLocation(orig) { return tr.RoundTripper.RoundTrip(orig) } diff --git a/registry/types.go b/registry/types.go index 8a201a9172bbc..9b2562f969560 100644 --- a/registry/types.go +++ b/registry/types.go @@ -26,7 +26,7 @@ type SearchResults struct { Query string `json:"query"` // NumResults indicates the number of results the query returned NumResults int `json:"num_results"` - // Results is a slice containing the acutal results for the search + // Results is a slice containing the actual results for the search Results []SearchResult `json:"results"` } diff --git a/runconfig/config.go b/runconfig/config.go index 7e57785b5fe49..f4af1017e22a6 100644 --- a/runconfig/config.go +++ b/runconfig/config.go @@ -59,7 +59,7 @@ func DecodeContainerConfig(src io.Reader) (*Config, *HostConfig, error) { // Perform platform-specific processing of Volumes and Binds. if w.Config != nil && hc != nil { - // Initialise the volumes map if currently nil + // Initialize the volumes map if currently nil if w.Config.Volumes == nil { w.Config.Volumes = make(map[string]struct{}) } diff --git a/runconfig/config_unix.go b/runconfig/config_unix.go index 63bd0a2f7a3e8..18b2fee7c8dc0 100644 --- a/runconfig/config_unix.go +++ b/runconfig/config_unix.go @@ -46,7 +46,7 @@ func (w *ContainerConfigWrapper) getHostConfig() *HostConfig { } // Make sure NetworkMode has an acceptable value. We do this to ensure - // backwards compatible API behaviour. + // backwards compatible API behavior. hc = SetDefaultNetModeIfBlank(hc) return hc diff --git a/runconfig/parse.go b/runconfig/parse.go index 16e771cbbb8f4..cc0a5c65370c3 100644 --- a/runconfig/parse.go +++ b/runconfig/parse.go @@ -229,7 +229,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe } } - // Can't evalute options passed into --tmpfs until we actually mount + // Can't evaluate options passed into --tmpfs until we actually mount tmpfs := make(map[string]string) for _, t := range flTmpfs.GetAll() { if arr := strings.SplitN(t, ":", 2); len(arr) > 1 { diff --git a/runconfig/parse_test.go b/runconfig/parse_test.go index b87c60df4f48e..5dbd8c6392ddd 100644 --- a/runconfig/parse_test.go +++ b/runconfig/parse_test.go @@ -343,7 +343,7 @@ func setupPlatformVolume(u []string, w []string) ([]string, string) { return a, s } -// Simple parse with MacAddress validatation +// Simple parse with MacAddress validation func TestParseWithMacAddress(t *testing.T) { invalidMacAddress := "--mac-address=invalidMacAddress" validMacAddress := "--mac-address=92:d0:c6:0a:29:33" diff --git a/volume/local/local.go b/volume/local/local.go index e0c3a64462f8e..9f7349faa76b6 100644 --- a/volume/local/local.go +++ b/volume/local/local.go @@ -18,7 +18,7 @@ import ( ) // VolumeDataPathName is the name of the directory where the volume data is stored. -// It uses a very distintive name to avoid collisions migrating data between +// It uses a very distinctive name to avoid collisions migrating data between // Docker versions. const ( VolumeDataPathName = "_data" @@ -28,7 +28,7 @@ const ( var ( // ErrNotFound is the typed error returned when the requested volume name can't be found ErrNotFound = errors.New("volume not found") - // volumeNameRegex ensures the name asigned for the volume is valid. + // volumeNameRegex ensures the name assigned for the volume is valid. // This name is used to create the bind directory, so we need to avoid characters that // would make the path to escape the root directory. volumeNameRegex = utils.RestrictedNamePattern diff --git a/volume/store/errors.go b/volume/store/errors.go index 266faf70ed034..0cc59cdea8e52 100644 --- a/volume/store/errors.go +++ b/volume/store/errors.go @@ -22,7 +22,7 @@ type OpErr struct { Name string } -// Error satifies the built-in error interface type. +// Error satisfies the built-in error interface type. func (e *OpErr) Error() string { if e == nil { return "" diff --git a/volume/store/store_windows.go b/volume/store/store_windows.go index a42c1f841372a..8601cdd5cfda2 100644 --- a/volume/store/store_windows.go +++ b/volume/store/store_windows.go @@ -5,7 +5,7 @@ import "strings" // normaliseVolumeName is a platform specific function to normalise the name // of a volume. On Windows, as NTFS is case insensitive, under // c:\ProgramData\Docker\Volumes\, the folders John and john would be synonymous. -// Hence we can't allow the volume "John" and "john" to be created as seperate +// Hence we can't allow the volume "John" and "john" to be created as separate // volumes. func normaliseVolumeName(name string) string { return strings.ToLower(name) diff --git a/volume/volume_windows.go b/volume/volume_windows.go index ef7a25476a283..ae4031d8cda23 100644 --- a/volume/volume_windows.go +++ b/volume/volume_windows.go @@ -45,7 +45,7 @@ const ( // RXReservedNames are reserved names not possible on Windows RXReservedNames = `(con)|(prn)|(nul)|(aux)|(com[1-9])|(lpt[1-9])` - // RXSource is the combined possiblities for a source + // RXSource is the combined possibilities for a source RXSource = `((?P((` + RXHostDir + `)|(` + RXName + `))):)?` // Source. Can be either a host directory, a name, or omitted: