docs: Various typo found by codespell

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
This commit is contained in:
Shengjing Zhu
2020-12-21 00:11:32 +08:00
parent b4c604692e
commit 5988bfc1ef
21 changed files with 25 additions and 25 deletions

View File

@@ -329,7 +329,7 @@ func WithDevices(osi osinterface.OS, config *runtime.ContainerConfig) oci.SpecOp
}
}
// WithCapabilities sets the provided capabilties from the security context
// WithCapabilities sets the provided capabilities from the security context
func WithCapabilities(sc *runtime.LinuxContainerSecurityContext) oci.SpecOpts {
capabilities := sc.GetCapabilities()
if capabilities == nil {

View File

@@ -38,7 +38,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
)
// FakeShaper provides an implementation of the bandwith.Shaper.
// FakeShaper provides an implementation of the bandwidth.Shaper.
// Beware this is implementation has no features besides Reset and GetCIDRs.
type FakeShaper struct {
CIDRs []string

View File

@@ -46,7 +46,7 @@ func validateBandwidthIsReasonable(rsrc *resource.Quantity) error {
return fmt.Errorf("resource is unreasonably small (< 1kbit)")
}
if rsrc.Value() > maxRsrc.Value() {
return fmt.Errorf("resoruce is unreasonably large (> 1Pbit)")
return fmt.Errorf("resource is unreasonably large (> 1Pbit)")
}
return nil
}

View File

@@ -92,7 +92,7 @@ func (c *criService) containerMetrics(
}
}
default:
return &cs, errors.Errorf("unxpected metrics type: %v", metrics)
return &cs, errors.Errorf("unexpected metrics type: %v", metrics)
}
}

View File

@@ -56,7 +56,7 @@ func TestGetUserFromImage(t *testing.T) {
"empty user": {
user: "",
},
"multiple spearators": {
"multiple separators": {
user: "1:2:3",
uid: newI64(1),
},
@@ -99,7 +99,7 @@ func TestGetRepoDigestAndTag(t *testing.T) {
expectedRepoDigest: "",
expectedRepoTag: "gcr.io/library/busybox:latest",
},
"repo digest should not be empty if orignal ref is schema1 but has digest": {
"repo digest should not be empty if original ref is schema1 but has digest": {
ref: "gcr.io/library/busybox@sha256:e6693c20186f837fc393390135d8a598a96a833917917789d63766cab6c59594",
schema1: true,
expectedRepoDigest: "gcr.io/library/busybox@sha256:e6693c20186f837fc393390135d8a598a96a833917917789d63766cab6c59594",

View File

@@ -47,7 +47,7 @@ import (
// 2) Containerd containers may be deleted, but SHOULD NOT be added. Or else, recovery logic
// for the newly added container/sandbox will return error, because there is no corresponding root
// directory created.
// 3) Containerd container tasks may exit or be stoppped, deleted. Even though current logic could
// 3) Containerd container tasks may exit or be stopped, deleted. Even though current logic could
// tolerant tasks being created or started, we prefer that not to happen.
// recover recovers system state from containerd and status checkpoint.
@@ -264,7 +264,7 @@ func (c *criService) loadContainer(ctx context.Context, cntr containerd.Containe
return errors.Errorf("unexpected container state for created task: %q", status.State())
}
case containerd.Running:
// Task is running. Container must be in `RUNNING` state, based on our assuption that
// Task is running. Container must be in `RUNNING` state, based on our assumption that
// "task should not be started when containerd is down".
switch status.State() {
case runtime.ContainerState_CONTAINER_EXITED:

View File

@@ -156,7 +156,7 @@ type StatusStorage interface {
// Delete the container status.
// Note:
// * Delete should be idempotent.
// * The status must be deleted in one trasaction.
// * The status must be deleted in one transaction.
Delete() error
}

View File

@@ -175,7 +175,7 @@ func LoadNetNS(path string) *NetNS {
return &NetNS{path: path}
}
// Remove removes network namepace. Remove is idempotent, meaning it might
// Remove removes network namespace. Remove is idempotent, meaning it might
// be invoked multiple times and provides consistent result.
func (n *NetNS) Remove() error {
return unmountNS(n.path)

View File

@@ -39,7 +39,7 @@ func LoadNetNS(path string) *NetNS {
return &NetNS{path: path}
}
// Remove removes network namepace. Remove is idempotent, meaning it might
// Remove removes network namespace. Remove is idempotent, meaning it might
// be invoked multiple times and provides consistent result.
func (n *NetNS) Remove() error {
return errNotImplementedOnUnix

View File

@@ -41,7 +41,7 @@ func LoadNetNS(path string) *NetNS {
return &NetNS{path: path}
}
// Remove removes network namepace if it exists and not closed. Remove is idempotent,
// Remove removes network namespace if it exists and not closed. Remove is idempotent,
// meaning it might be invoked multiple times and provides consistent result.
func (n *NetNS) Remove() error {
hcnNamespace, err := hcn.GetNamespaceByID(n.path)