From 7961198a0c643501b70b77debc3ab1960566997b Mon Sep 17 00:00:00 2001 From: William Zhang Date: Fri, 28 Sep 2018 15:02:28 +0800 Subject: [PATCH] fix spelling errors Signed-off-by: William Zhang --- cache/memory/memory.go | 2 +- container/common/inotify_watcher.go | 2 +- container/docker/handler.go | 2 +- fs/fs.go | 2 +- info/v1/container.go | 4 ++-- info/v2/container.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cache/memory/memory.go b/cache/memory/memory.go index 4152692e..9c4ecf56 100644 --- a/cache/memory/memory.go +++ b/cache/memory/memory.go @@ -29,7 +29,7 @@ import ( // ErrDataNotFound is the error resulting if failed to find a container in memory cache. var ErrDataNotFound = errors.New("unable to find data in memory cache") -// TODO(vmarmol): See about refactoring this class, we have an unecessary redirection of containerCache and InMemoryCache. +// TODO(vmarmol): See about refactoring this class, we have an unnecessary redirection of containerCache and InMemoryCache. // containerCache is used to store per-container information type containerCache struct { ref info.ContainerReference diff --git a/container/common/inotify_watcher.go b/container/common/inotify_watcher.go index 16e2f2c9..16ac1456 100644 --- a/container/common/inotify_watcher.go +++ b/container/common/inotify_watcher.go @@ -78,7 +78,7 @@ func (iw *InotifyWatcher) RemoveWatch(containerName, dir string) (bool, error) { iw.lock.Lock() defer iw.lock.Unlock() - // If we don't have a watch registed for this, just return. + // If we don't have a watch registered for this, just return. cgroupsWatched, ok := iw.containersWatched[containerName] if !ok { return false, nil diff --git a/container/docker/handler.go b/container/docker/handler.go index 69f84faf..dc296f24 100644 --- a/container/docker/handler.go +++ b/container/docker/handler.go @@ -228,7 +228,7 @@ func newDockerContainerHandler( handler.labels["restartcount"] = strconv.Itoa(ctnr.RestartCount) } - // Obtain the IP address for the contianer. + // Obtain the IP address for the container. // If the NetworkMode starts with 'container:' then we need to use the IP address of the container specified. // This happens in cases such as kubernetes where the containers doesn't have an IP address itself and we need to use the pod's address ipAddress := ctnr.NetworkSettings.IPAddress diff --git a/fs/fs.go b/fs/fs.go index 7d0ead97..145b8fdc 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -114,7 +114,7 @@ func NewFsInfo(context Context) (FsInfo, error) { fsUUIDToDeviceName, err := getFsUUIDToDeviceNameMap() if err != nil { - // UUID is not always avaiable across different OS distributions. + // UUID is not always available across different OS distributions. // Do not fail if there is an error. glog.Warningf("Failed to get disk UUID mapping, getting disk info by uuid will not work: %v", err) } diff --git a/info/v1/container.go b/info/v1/container.go index 41f7ae53..b3a18528 100644 --- a/info/v1/container.go +++ b/info/v1/container.go @@ -102,11 +102,11 @@ type ContainerInfoRequest struct { NumStats int `json:"num_stats,omitempty"` // Start time for which to query information. - // If ommitted, the beginning of time is assumed. + // If omitted, the beginning of time is assumed. Start time.Time `json:"start,omitempty"` // End time for which to query information. - // If ommitted, current time is assumed. + // If omitted, current time is assumed. End time.Time `json:"end,omitempty"` } diff --git a/info/v2/container.go b/info/v2/container.go index d32f571c..0e2fc7ea 100644 --- a/info/v2/container.go +++ b/info/v2/container.go @@ -38,7 +38,7 @@ type CpuSpec struct { Mask string `json:"mask,omitempty"` // CPUQuota Default is disabled Quota uint64 `json:"quota,omitempty"` - // Period is the CPU reference time in ns e.g the quota is compared aginst this. + // Period is the CPU reference time in ns e.g the quota is compared against this. Period uint64 `json:"period,omitempty"` }