diff --git a/cmd/containerd-shim-runhcs-v1/serve.go b/cmd/containerd-shim-runhcs-v1/serve.go index 9b1213b087..b88c3a79c2 100644 --- a/cmd/containerd-shim-runhcs-v1/serve.go +++ b/cmd/containerd-shim-runhcs-v1/serve.go @@ -281,11 +281,11 @@ func readOptions(r io.Reader) (*runhcsopts.Options, error) { if len(d) > 0 { var a types.Any if err := proto.Unmarshal(d, &a); err != nil { - return nil, errors.Wrap(err, "failed unmarshaling into Any") + return nil, errors.Wrap(err, "failed unmarshalling into Any") } v, err := typeurl.UnmarshalAny(&a) if err != nil { - return nil, errors.Wrap(err, "failed unmarshaling by typeurl") + return nil, errors.Wrap(err, "failed unmarshalling by typeurl") } return v.(*runhcsopts.Options), nil } diff --git a/container.go b/container.go index 640e0b26f4..c8f09f88b9 100644 --- a/container.go +++ b/container.go @@ -62,7 +62,7 @@ type container struct { waitCh chan struct{} } -// createComputeSystemAdditionalJSON is read from the environment at initialisation +// createContainerAdditionalJSON is read from the environment at initialization // time. It allows an environment variable to define additional JSON which // is merged in the CreateComputeSystem call to HCS. var createContainerAdditionalJSON []byte diff --git a/hcn/hcnnamespace.go b/hcn/hcnnamespace.go index 7539e39fa8..44ba2fa1fd 100644 --- a/hcn/hcnnamespace.go +++ b/hcn/hcnnamespace.go @@ -296,11 +296,11 @@ func GetNamespaceContainerIds(namespaceId string) ([]string, error) { var containerIds []string for _, resource := range namespace.Resources { if resource.Type == "Container" { - var contaienrResource NamespaceResourceContainer - if err := json.Unmarshal([]byte(resource.Data), &contaienrResource); err != nil { + var containerResource NamespaceResourceContainer + if err := json.Unmarshal([]byte(resource.Data), &containerResource); err != nil { return nil, err } - containerIds = append(containerIds, contaienrResource.Id) + containerIds = append(containerIds, containerResource.Id) } } return containerIds, nil @@ -377,7 +377,7 @@ func (namespace *HostComputeNamespace) Sync() error { } shimPath := runhcs.VMPipePath(cfg.HostUniqueID) if err := runhcs.IssueVMRequest(shimPath, &req); err != nil { - // The shim is likey gone. Simply ignore the sync as if it didn't exist. + // The shim is likely gone. Simply ignore the sync as if it didn't exist. if perr, ok := err.(*os.PathError); ok && perr.Err == syscall.ERROR_FILE_NOT_FOUND { // Remove the reg key there is no point to try again _ = cfg.Remove() diff --git a/internal/guest/runtime/hcsv2/process.go b/internal/guest/runtime/hcsv2/process.go index 0a7dee8b30..e68a63070c 100644 --- a/internal/guest/runtime/hcsv2/process.go +++ b/internal/guest/runtime/hcsv2/process.go @@ -55,7 +55,7 @@ type containerProcess struct { // (runtime.Process).Wait() call returns, and exitCode has been updated. exitWg sync.WaitGroup - // Used to allow addtion/removal to the writersWg after an initial wait has + // Used to allow addition/removal to the writersWg after an initial wait has // already been issued. It is not safe to call Add/Done without holding this // lock. writersSyncRoot sync.Mutex diff --git a/internal/lcow/scratch.go b/internal/lcow/scratch.go index 001f3347cd..c86d141adf 100644 --- a/internal/lcow/scratch.go +++ b/internal/lcow/scratch.go @@ -32,7 +32,7 @@ const ( // requested size. It has a caching capability. If the cacheFile exists, and the // request is for a default size, a copy of that is made to the target. If the // size is non-default, or the cache file does not exist, it uses a utility VM -// to create target. It is the responsibility of the caller to synchronise +// to create target. It is the responsibility of the caller to synchronize // simultaneous attempts to create the cache file. func CreateScratch(ctx context.Context, lcowUVM *uvm.UtilityVM, destFile string, sizeGB uint32, cacheFile string) error { if lcowUVM == nil { diff --git a/pkg/securitypolicy/securitypolicy.go b/pkg/securitypolicy/securitypolicy.go index c9cdf3226f..5bd25a2d78 100644 --- a/pkg/securitypolicy/securitypolicy.go +++ b/pkg/securitypolicy/securitypolicy.go @@ -397,7 +397,7 @@ func newMountConstraints(mountConfigs []MountConfig) Mounts { } } -// Custom JSON marshalling to add `lenth` field that matches the number of +// Custom JSON marshalling to add `length` field that matches the number of // elements present in the `elements` field. func (c Containers) MarshalJSON() ([]byte, error) { diff --git a/pkg/securitypolicy/securitypolicyenforcer.go b/pkg/securitypolicy/securitypolicyenforcer.go index 5b17589838..f36ca7ac1f 100644 --- a/pkg/securitypolicy/securitypolicyenforcer.go +++ b/pkg/securitypolicy/securitypolicyenforcer.go @@ -161,7 +161,7 @@ var _ SecurityPolicyEnforcer = (*StandardSecurityPolicyEnforcer)(nil) func NewStandardSecurityPolicyEnforcer(containers []securityPolicyContainer, encoded string) *StandardSecurityPolicyEnforcer { // create new StandardSecurityPolicyEnforcer and add the expected containers // to it - // fill out corresponding devices structure by creating a "same shapped" + // fill out corresponding devices structure by creating a "same shaped" // devices listing that corresponds to our container root hash lists // the devices list will get filled out as layers are mounted devices := make([][]string, len(containers)) diff --git a/test/vendor/github.com/Microsoft/hcsshim/container.go b/test/vendor/github.com/Microsoft/hcsshim/container.go index 640e0b26f4..c8f09f88b9 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/container.go +++ b/test/vendor/github.com/Microsoft/hcsshim/container.go @@ -62,7 +62,7 @@ type container struct { waitCh chan struct{} } -// createComputeSystemAdditionalJSON is read from the environment at initialisation +// createContainerAdditionalJSON is read from the environment at initialization // time. It allows an environment variable to define additional JSON which // is merged in the CreateComputeSystem call to HCS. var createContainerAdditionalJSON []byte diff --git a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go index 7539e39fa8..44ba2fa1fd 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go +++ b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go @@ -296,11 +296,11 @@ func GetNamespaceContainerIds(namespaceId string) ([]string, error) { var containerIds []string for _, resource := range namespace.Resources { if resource.Type == "Container" { - var contaienrResource NamespaceResourceContainer - if err := json.Unmarshal([]byte(resource.Data), &contaienrResource); err != nil { + var containerResource NamespaceResourceContainer + if err := json.Unmarshal([]byte(resource.Data), &containerResource); err != nil { return nil, err } - containerIds = append(containerIds, contaienrResource.Id) + containerIds = append(containerIds, containerResource.Id) } } return containerIds, nil @@ -377,7 +377,7 @@ func (namespace *HostComputeNamespace) Sync() error { } shimPath := runhcs.VMPipePath(cfg.HostUniqueID) if err := runhcs.IssueVMRequest(shimPath, &req); err != nil { - // The shim is likey gone. Simply ignore the sync as if it didn't exist. + // The shim is likely gone. Simply ignore the sync as if it didn't exist. if perr, ok := err.(*os.PathError); ok && perr.Err == syscall.ERROR_FILE_NOT_FOUND { // Remove the reg key there is no point to try again _ = cfg.Remove() diff --git a/test/vendor/github.com/Microsoft/hcsshim/internal/lcow/scratch.go b/test/vendor/github.com/Microsoft/hcsshim/internal/lcow/scratch.go index 001f3347cd..c86d141adf 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/internal/lcow/scratch.go +++ b/test/vendor/github.com/Microsoft/hcsshim/internal/lcow/scratch.go @@ -32,7 +32,7 @@ const ( // requested size. It has a caching capability. If the cacheFile exists, and the // request is for a default size, a copy of that is made to the target. If the // size is non-default, or the cache file does not exist, it uses a utility VM -// to create target. It is the responsibility of the caller to synchronise +// to create target. It is the responsibility of the caller to synchronize // simultaneous attempts to create the cache file. func CreateScratch(ctx context.Context, lcowUVM *uvm.UtilityVM, destFile string, sizeGB uint32, cacheFile string) error { if lcowUVM == nil { diff --git a/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicy.go b/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicy.go index c9cdf3226f..5bd25a2d78 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicy.go +++ b/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicy.go @@ -397,7 +397,7 @@ func newMountConstraints(mountConfigs []MountConfig) Mounts { } } -// Custom JSON marshalling to add `lenth` field that matches the number of +// Custom JSON marshalling to add `length` field that matches the number of // elements present in the `elements` field. func (c Containers) MarshalJSON() ([]byte, error) { diff --git a/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicyenforcer.go b/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicyenforcer.go index 5b17589838..f36ca7ac1f 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicyenforcer.go +++ b/test/vendor/github.com/Microsoft/hcsshim/pkg/securitypolicy/securitypolicyenforcer.go @@ -161,7 +161,7 @@ var _ SecurityPolicyEnforcer = (*StandardSecurityPolicyEnforcer)(nil) func NewStandardSecurityPolicyEnforcer(containers []securityPolicyContainer, encoded string) *StandardSecurityPolicyEnforcer { // create new StandardSecurityPolicyEnforcer and add the expected containers // to it - // fill out corresponding devices structure by creating a "same shapped" + // fill out corresponding devices structure by creating a "same shaped" // devices listing that corresponds to our container root hash lists // the devices list will get filled out as layers are mounted devices := make([][]string, len(containers))