Skip to content

Commit

Permalink
Fix typos found across repository
Browse files Browse the repository at this point in the history
Signed-off-by: Justas Brazauskas <[email protected]>
  • Loading branch information
jutaz committed Dec 13, 2015
1 parent f5e6b09 commit 927b334
Show file tree
Hide file tree
Showing 117 changed files with 159 additions and 159 deletions.
2 changes: 1 addition & 1 deletion api/client/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{"."}
Expand Down
4 changes: 2 additions & 2 deletions api/client/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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`
Expand Down
6 changes: 3 additions & 3 deletions api/client/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion api/client/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion api/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/server/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
//
Expand Down
2 changes: 1 addition & 1 deletion api/server/router/local/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion api/server/router/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down
2 changes: 1 addition & 1 deletion api/types/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion builder/dockerfile/bflag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion builder/dockerfile/dispatchers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion builder/dockerfile/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion builder/dockerfile/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion cliconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion container/container_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion container/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions contrib/download-frozen-image-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion daemon/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions daemon/create_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion daemon/debugtrap_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion daemon/execdriver/native/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/btrfs/version_none.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 "-"
Expand Down
12 changes: 6 additions & 6 deletions daemon/graphdriver/devmapper/deviceset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/devmapper/devmapper_doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
// */
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/devmapper/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions daemon/graphdriver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion daemon/graphdriver/zfs/zfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]'.
Expand Down
2 changes: 1 addition & 1 deletion daemon/kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion daemon/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion daemon/logger/fluentd/fluentd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion daemon/logger/jsonfilelog/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 927b334

Please sign in to comment.