diff --git a/api/client/build.go b/api/client/build.go index 0516f5385f35103d3cc315d23fc0412ad1b9bb6a..0b9472a0a14c9f11f4c469c0b03a03248e53b606 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 ab9268971045075ad9f5043e447c81e691cffc10..0c3f19ffc64fad4b2679748cfb755e7e62592dbd 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 fae446cdb453d9176d4b4e213d949130f6709b06..b6e70f5f4db5b04038f22644b3b18856065d32d9 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 787f87d11808d4d44098396001c9d1b67974bc2b..cdd364a11a0d2aabc19c31d5b40185ca6afb7a7b 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 3a845028d8b36804bc2155d8d1329c3350ec1048..3f9f81d8011a764a358f8491c7e7b68893d7c6b7 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 04944b99d28073b86487ea792772cb6f7851bab8..3bb64192750f6a6ef0a63699de38b8a08f80eab2 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 2ddc28610d7386fc63c3c59e5b220ca6d388297c..3bba34a0d30a90a5a8393c786dfd72e587a65a81 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 ace1067246f74294c6af589ba0b2247e2dc3bd02..2a3106aeec3bb1ca3b3e67f7bc71185c8321f3bf 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 ecc144f6095d17a5249c45d06d693d7ddd3a8ddd..e21fe39c9d89681a4fb1cb0438231ba716b38267 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 24f73111ba18689d52f20cb9340131a67f5c74b0..c2e6c7dae0b2a686bd82ab892c20504bbb5e3451 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 e2d6f828f52e229f8c7c3bd5e81b53c376773c71..08f64f1ac37ee0f3b12a20c131d54ee4daa786dc 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 0080a9968bea90074ce6499f3b9aa688473c75e2..2b3d2c829704fb205f637b55bf4215b409619242 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 ee892cf9ac2796c8716bc9c32f01c97390329632..983a590a62098f9e1cffe36fdb52ff4c294df335 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 0bcf87d87dfe513d73ff25645188d2118681ffff..f2dab3395ff71b96f28677085deaf71d9a597f09 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 d1f547f3f9d89a7c57e9070a91b6f73f146afdb7..8285d3196ebb9a4736c83a2d9ff6cee773ba1def 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 90b1bf4896e6b2471f27ce9015aab7753a103f9c..683c59bb092bbdca49eaac5d7f565811268f3c00 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 dd387aaa42ea051e29d86522059db85a55125213..3c29ba362e8620ca2378f20cb9d5e58a7a86d768 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 ca48646b9730300c4a190a36f0183e489cbb8823..81b047561e0ec82deae653d232a00d8daf89845f 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 39429899a338f8e5c615f7169b6cececc0524271..de329741c20fa18ef519e1ab3736b74c32afd2e8 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 5affc91d2f348982d2afea6fb7b83c63781ad4a5..f150fcbab8e057c0c0ba737ea49a74ad8abaa881 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 4c47947ba1bc2e773ad31931b6c1c612e9da64fa..a981c1ea6fc0fe25fb742422d912cac9f32515f3 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 d0da54458857347fd723b954529dbdb52ed628e2..0ef2ae6eeaa414d5f3b4b9f8b341928b3af2fe2f 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 7defec397b0375d33d026551af211647bf8d6f5c..f802fbc6290e0eb574a57c6db21c7351fdb1231a 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 46a0bcb9aa93505622ee33bb714b12496fe0ebc6..4d451cfde840b357b3775dddba8299bbfe958005 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 c1c3e3891b2ab309c75a9d0bd3f38f2fd84c1bbb..9ab3e4f8643d37c2b63268e98c400e433573f55f 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 8a34f7e16ba044e0a387d43f1e60a54cbe30a0bf..c34319334c4c9e762547e179fc21b8d2de891a31 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 4a6e67c9e0afdf56de5feca809641f67af0ec351..649d0a4b707ce4f5b21db9d5f848e3edab899878 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 211adeec8a4097c647924d193c5b4b02bdb99ba7..67b9193005af30391868270b46855f2b1d1bea61 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 156f4cfa15c25a44d60c13f1c50c742350a1757a..e0967983481afc0b14478852ea4e2a281b30c615 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 06f63149551b068631f2a85bc9e60c23688bf3ef..0f962223c6bc139e43918c5cfcbc19bba7da7b37 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 a0ede7b5b20ee8b538477193da3fc7ca682a78ac..5bec6bd384f5dfa23b0b21a7831fbeda3ea9137e 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 51e63d5236d6e4691459a2b6af67e0a42abd4d7f..825de3a1ae15c71a785bd6dae7655d3c5153937b 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 66c7b63da78e1894220626c78ddb6648fcdf7864..fd695c83dc2c736256700cddaef98b896fd8a41b 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 b66368030b3bea657c2c6545b7b4bea5d09a1129..0d2553a13fdf0b77fda0f2ec284b08f02604ad20 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 246302ffc660cbbafe8ef7f90b646eaf4f923cf5..706478aa949bbfc0ecc19e1b4bd881311259c1f4 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 78459d28087893ec9028c7a5f646e0c7b413929a..53742faa079827d2d41519efc1a642dbc4f51c89 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 513c83d3cea44cee8df092cc1843b4a64a19747b..d6b1ebbcef127965aee50b66a55b47eb7b1ea471 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 7e6cd6c4d632fb538eb57fe471e3f3f3c189df5a..ba8e4190d178ea05389243ef9b073d476c9f6e34 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 c0ae3d1c4b1f18ca279c41dec67af9946b4e4461..7f323c1df5a41538b10147c2a613a088a41e3fb8 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 d22a3d702dc881546913fcb41665de0184ce2a66..9ad7c6e2d1f3df1ffe91910307dc6ccf51043f2d 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 a5bb82ed411743b444283b775f00136cc8b23234..68bba70415876633c69bc292b40d8877108ac23c 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 c839ff30d240e98552ea09ed0c8cbc7935f317ef..4f86c5f9943651396707e817eb80af73a3406dee 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 b4c11c22879a70b9e99dd3da794c6bb7a550ff73..cc5cde07611b10ef4d0559ed925a425cbfdfaa11 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 25bb790fb1e296dcf878b67eb58984a42bc518b6..b6a7f59478d975b180f37856512d67a8ac12fce0 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 df88717385b9d0cb10806d1b335e114eef37a8d3..d0e299a69e58ea8c87c202bcca39ca3ffa2a65cd 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 932431dbf230b76a5ee7a6c4ff26e626a6de074b..7f002df2943ab34e6c5a7da488618e857af4bd61 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 21fed03050873734e02fef6ea9b751f7f18c9b9c..c32ae2926b0454d56c24333e8bdba369ed879927 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 700fdde13bc467631a505341af36456c93023a91..428cdb7750fb0f0e0903c87849706eae4f6311cb 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 5a204fa7cf5832afb594591e734db484147d378f..cb713f7d65387ac666998c90a158eb6e5fe5d012 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 0f811a3adb6374f75f91f9cd47b9a99b005808eb..95f4db090bb56c7bb9b08cc147cd8cb57af968d3 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 7b2ae7e89d8141d5f6aa8c10e06c9b10a4d87c19..c031ff8e40d06e17efb2277b2648f89ea1f9fb4a 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 0790b78e4558248fa2259c711c6139a3b7ad361d..35ea3c25ea905df932c8eb519a447a3fa0069ded 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 ed44ef377f52a477366941549652ac53c4191f29..ee4a2884f9da214cff7b9635df4ca78fe61861b5 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 e817db518455160c89d50db251fd521846c88a12..285d466b975451eca55310cfe88947d8040535c6 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 6a2b179d45e067fa9164233c84da3fa702752420..45db04bfda8f73747f91b6265cb1aae5b83ad1ed 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 6c3e36440b7445246aa93cc3a412383e2235c54b..a0a8e7d699fde4edc62da45eee2116c5fa9b3238 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 ea145105aa8e71281e123f5e05b61bdf1734395c..e5e7ab36665e68c8033a4d620d9146579e885e06 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 8db301376d265fe089d7dfe40fae93359b9186c9..b540af51c8a2be6fc13d3b5929de598365ea4928 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 c0db6ef1589d0ad1706f9b2b5eb059ec1eafac34..63fbd4466588124f77d4d8b8b9531993c786eaac 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 9ed7762b0f149418e2980923284de0b824865bc7..d8211509299bf7b88be006508195b4ff882f641d 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 8fc0b7eef22783fb83033f7c0b9dd5b81c6142b1..d8db5216d65461f1128b1e7b813a1fc8a9540c9e 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 38bfdacfe8bbd552526cc66f8dc8e0449906e77d..0d9306f4ad790492b6b1a06de2900fbbeafaf25c 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 22ce9c1ae90adc337ae9362ff1d6a34c24c27f19..f8810dfc1190bc492765bb084cfe818bed835567 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 6d49abe579204b52220e1e6124c34b3fc486aac9..13aade916d0541ebf98ad65accc6e3aa6283c08c 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 de002071bcb6fe0791837a211dedf046435b0233..e87673693001fa4ead6906571203a0882cceb766 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 d0b54aa27cab9e248571a3841a106f08cb0894a9..5580032641af73cbebc1839b3697410c05380024 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 d4533e4f5659d66fe79971158a7439a4f70b5487..73b922e3458b6482c3f49112655879c75e2b3ca9 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 701dd7624461a294846002ab36a38156361c5105..a5f9523d3fc3141cf390481cb14ea606529f63ab 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 bf0eda92ebbfd8a65569963317c2f1b664245b58..fb8d7b00b8e245cf408718b7510a26833ce6172f 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 cee553a237cfa7d80588ff2aa62101505d73b725..82a4ea20d544e06670a0e046346a387dbf7d281c 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 a172267b5bbb42b5ce2fe955990ced11a474918b..a2e2200fa1bc4fc98b05ad025f05ada92c3d1e04 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 d787b56ca6a0831d8ec4370ef6ab2e8313f0592e..c7b0dc99473a372485d223f6a049156379bd31f6 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 0da65828b8ec01b48c55ad99910b6b6e7a17e0c5..1281683ee474f92a5c9a84f52a3dca71d715793d 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 abf9ad7802eaec0a8931c4fe390a7678881ec022..fbc3bb8c4d1b1f7645eeeab5f2a3f6925fb820af 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 b348cde6a0c5ac3df037cc53ca40f685c9858c0b..5c3a1be3401d5f7a801df696067c97d77c8cdc7b 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 e0bd4c461e169779890a0b911fe2ef2c46502886..81651c61d62a9b3c4dd8dcf51bcc7256951a907a 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 3d9c3132135c48a826def1ddcd6b789979a7e556..d20478a10dc158c88ab312086d5fb20497192374 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 6670bd466796774ecd8a52c5657db8d4edf4be38..30e0a4871b2a63c8514d2a4185d894116a1cc754 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 2475e3304db07e9952894e45ffd255e65d0d288a..a5133093b6a6b40c1d0cefba41aa9cba1a25a3c3 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 e042c6bba4a9386b28700238659159924d587290..23befae6789c06f46b7779ed355363c6e720c7ce 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 a55266d0e5e5ee8a6b99cb31defca3f5f5f65d24..0d92afd4cb2a38da87c2f008b543155173c97d8d 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 3fdf6922890dfeb039d6a4ad27e68dbd2f314fe1..b5057ecd1290509e7dff7fcb89e0742f21572e71 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 330a5339046ef180949089e8fea8864f1c8252b7..48c33b6a55e79bf30dba846855f1b6807154381a 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 7c5df4e90a97ecb19ab3ec9f79a31163ae1d2e5d..b2c5849796d487a3f40f4273525f29ee8398aadb 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 7a3249f3a0fe20283543e4b856062d634e42c7e6..ccc7f9c23e0f4e9422de8d5bc736f8b488f58bf0 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 9a717698ea9abf0a3102a992329292b940363e37..422e4bbd92b251d6009b67d67fb97cc335882874 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 e20b2420c244681b20450da9be0d5cb5f379483c..c234ff68048178e1c8730abe1a4c78323186f86c 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 e4984bac96526b734cc8da9d94b6a3aac2f03ffe..0b22ddfab85c6af93fc0a3d612e76250e5808c24 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 d430f13a2b64e3b35715e43f1ddbb32ce2ae7c65..ddcd62c1c7c0389afad233afed5c2487d1c993bd 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 2f9f5c58ee5d849e1ecd74eb77e4c16079503bc2..dc696dce9075216b586db78059f3a06e44c75b1b 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 4a8d22f02f7875fb0e9d05ffe0caa474066ab4cd..c1837942e3a98984dce23b5ed0860aa6ea29336e 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 7444201faef35b805234359964826a09a6abe17a..6c423ceae80c5cd1f4bc3be9d0325049fe84a6d1 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 e560aff11136d75c4b7aa82ff593748ad7ac50f6..70de4d1304c54572f8e7adc9a171a83f63d44f29 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 20491e05d6813e21d441975cd8f8b5cbcb9b835b..ceb98d25fc9909eaf6e79a45a8bf907a9d5697fe 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 b67a53d648ac4a76f64f8a27ce92a20b9c2c4c60..d6700184c1906c4babc517503ab585989e439a35 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 0332da6676c36e71dbe4e693e0e5ea55ce2bba1d..02d2594e1a6efa46bcec4d983502ca3570a11aed 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 4055754026eabf2d9c341590e8965d9e4589642b..dfe535edd7d1d1fa1cbfac6097b9811b05dda7c5 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 29bd4568864d73a355d2a3aec89a5227c8a6586d..70988a37e61469efe747a49ab2a4461c08458eec 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 c12619f577c76749bd757dce71024425453501ab..3c7e9edb73cfeec804842b4f62b04733bff9ee16 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 007bfa8c03314b4c759f336b9c1b3c33bdad0b0b..fc8a1aba95cb12e00f159b0e6dfbcf2d728670a9 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 7c2161c246357f0c10eb884ffd1d6e90acbd9262..5abf5e7ba39e6a5dd60384994f4e8099319f0d69 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 0f5783be1ba43afd51d0351f40ea795a9eff8776..4dc89bd4150f48a76f762c73301117b188c0f735 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 7912ae43e3b8a65360c67f80d5b8ae622d0c2895..316c3990537c8984e59450ebdac680be23cdc9a1 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 7502e885533ca813290b46e7bb15bed14d3c61f0..077d091f0b0c7b9a897ac2bfb9b858d1da5c008c 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 a410974835fc654489275b0f26d53e0d21f4abb3..1137db51b89505f8a8eec9727da915572b0eaa0e 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 c3f09a424c64bd62ce19c06f9a6137f6fb88fe89..e21ee4bc88ed1bd0f8b35fd4b3dae4b77901e3aa 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 20805767c686ed02de0d8720679fd6a2118323f2..72892a99f8eebb3df2171d08c1f1355949e3307b 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 5017aeacacbd004fceafddd937c953849adc500a..cecf936b26573a1c2c8f83d18f31d1b71be79be0 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 8a201a9172bbc5a38c47da81354c8ba8989293e3..9b2562f9695603cbebd3309e57cdebfd9bad5324 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 7e57785b5fe4917d122cffc49a5d60f9b5c6e06c..f4af1017e22a695273d880620c29459b4470abfd 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 63bd0a2f7a3e865a9f3a1d6063b275cba8b0b903..18b2fee7c8dc02174fa6b90d802a571378d07cd4 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 16e771cbbb8f4aab5cd64922b7835ec300370582..cc0a5c65370c3d43e813811bb59099f89e5fea4d 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 b87c60df4f48ecf39379beaa39b328680c3b1fbb..5dbd8c6392ddd324652cee44cced7a0b79703f3a 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 e0c3a64462f8ee1f3482a384a0178bf109efbe70..9f7349faa76b65276de1af399916f459294a6ce4 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 266faf70ed03486dd715d5ec434c7415744ffaee..0cc59cdea8e52d5a7f46181f48dd2bcad2111284 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 a42c1f841372a44c75aeb3a21c0c2db72b16df5d..8601cdd5cfda2b16f57a7d9f50bf90bb6d83a9ba 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 ef7a25476a283129a3382fb414a8452c9338c54c..ae4031d8cda239633c6726cb1106d207da0b503d 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: