From 2505b7bf8e9f486fe60a9cf1d6ed201249170999 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Tue, 1 Mar 2022 09:58:28 +0800 Subject: [PATCH 1/2] all: fix typo Signed-off-by: cuishuang --- cmd/containerd-shim-runhcs-v1/serve.go | 2 +- cmd/containerd-shim-runhcs-v1/task_hcs.go | 2 +- hcn/hcn.go | 4 ++-- hcn/hcnendpoint.go | 2 +- hcn/hcnerrors.go | 10 +++++----- hcn/hcnnamespace.go | 2 +- hnsnetwork.go | 4 ++-- internal/clone/registry.go | 2 +- internal/cni/registry.go | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/containerd-shim-runhcs-v1/serve.go b/cmd/containerd-shim-runhcs-v1/serve.go index 6a973f1c3c..d42431d7b8 100644 --- a/cmd/containerd-shim-runhcs-v1/serve.go +++ b/cmd/containerd-shim-runhcs-v1/serve.go @@ -84,7 +84,7 @@ var serveCommand = cli.Command{ } if shimOpts.Debug && shimOpts.LogLevel != "" { - logrus.Warning("Both Debug and LogLevel specified, Debug will be overriden") + logrus.Warning("Both Debug and LogLevel specified, Debug will be overridden") } // For now keep supporting the debug option, this used to be the only way to specify a different logging diff --git a/cmd/containerd-shim-runhcs-v1/task_hcs.go b/cmd/containerd-shim-runhcs-v1/task_hcs.go index 9076e2b08f..8238e7f172 100644 --- a/cmd/containerd-shim-runhcs-v1/task_hcs.go +++ b/cmd/containerd-shim-runhcs-v1/task_hcs.go @@ -428,7 +428,7 @@ type hcsTask struct { host *uvm.UtilityVM // ecl is the exec create lock for all non-init execs and MUST be held - // durring create to prevent ID duplication. + // during create to prevent ID duplication. ecl sync.Mutex execs sync.Map diff --git a/hcn/hcn.go b/hcn/hcn.go index df3a59a78c..fe3d13a052 100644 --- a/hcn/hcn.go +++ b/hcn/hcn.go @@ -228,7 +228,7 @@ func IPv6DualStackSupported() error { return platformDoesNotSupportError("IPv6 DualStack") } -//L4proxySupported returns an error if the HCN verison does not support L4Proxy +//L4proxySupported returns an error if the HCN version does not support L4Proxy func L4proxyPolicySupported() error { supported, err := GetCachedSupportedFeatures() if err != nil { @@ -240,7 +240,7 @@ func L4proxyPolicySupported() error { return platformDoesNotSupportError("L4ProxyPolicy") } -// L4WfpProxySupported returns an error if the HCN verison does not support L4WfpProxy +// L4WfpProxySupported returns an error if the HCN version does not support L4WfpProxy func L4WfpProxyPolicySupported() error { supported, err := GetCachedSupportedFeatures() if err != nil { diff --git a/hcn/hcnendpoint.go b/hcn/hcnendpoint.go index 545e8639d6..213cfe0b1f 100644 --- a/hcn/hcnendpoint.go +++ b/hcn/hcnendpoint.go @@ -9,7 +9,7 @@ import ( "github.com/sirupsen/logrus" ) -// IpConfig is assoicated with an endpoint +// IpConfig is associated with an endpoint type IpConfig struct { IpAddress string `json:",omitempty"` PrefixLength uint8 `json:",omitempty"` diff --git a/hcn/hcnerrors.go b/hcn/hcnerrors.go index ad30d320d9..1d52d2e72a 100644 --- a/hcn/hcnerrors.go +++ b/hcn/hcnerrors.go @@ -90,7 +90,7 @@ func new(hr error, title string, rest string) error { // we wish to seperate them as they are shim usage error // -// NetworkNotFoundError results from a failed seach for a network by Id or Name +// NetworkNotFoundError results from a failed search for a network by Id or Name type NetworkNotFoundError struct { NetworkName string NetworkID string @@ -103,7 +103,7 @@ func (e NetworkNotFoundError) Error() string { return fmt.Sprintf("Network ID %q not found", e.NetworkID) } -// EndpointNotFoundError results from a failed seach for an endpoint by Id or Name +// EndpointNotFoundError results from a failed search for an endpoint by Id or Name type EndpointNotFoundError struct { EndpointName string EndpointID string @@ -116,7 +116,7 @@ func (e EndpointNotFoundError) Error() string { return fmt.Sprintf("Endpoint ID %q not found", e.EndpointID) } -// NamespaceNotFoundError results from a failed seach for a namsepace by Id +// NamespaceNotFoundError results from a failed search for a namsepace by Id type NamespaceNotFoundError struct { NamespaceID string } @@ -125,7 +125,7 @@ func (e NamespaceNotFoundError) Error() string { return fmt.Sprintf("Namespace ID %q not found", e.NamespaceID) } -// LoadBalancerNotFoundError results from a failed seach for a loadbalancer by Id +// LoadBalancerNotFoundError results from a failed search for a loadbalancer by Id type LoadBalancerNotFoundError struct { LoadBalancerId string } @@ -134,7 +134,7 @@ func (e LoadBalancerNotFoundError) Error() string { return fmt.Sprintf("LoadBalancer %q not found", e.LoadBalancerId) } -// RouteNotFoundError results from a failed seach for a route by Id +// RouteNotFoundError results from a failed search for a route by Id type RouteNotFoundError struct { RouteId string } diff --git a/hcn/hcnnamespace.go b/hcn/hcnnamespace.go index d2ef229609..12e69de9cc 100644 --- a/hcn/hcnnamespace.go +++ b/hcn/hcnnamespace.go @@ -27,7 +27,7 @@ type NamespaceResourceContainer struct { type NamespaceResourceType string var ( - // NamespaceResourceTypeContainer are contianers associated with a Namespace. + // NamespaceResourceTypeContainer are containers associated with a Namespace. NamespaceResourceTypeContainer NamespaceResourceType = "Container" // NamespaceResourceTypeEndpoint are endpoints associated with a Namespace. NamespaceResourceTypeEndpoint NamespaceResourceType = "Endpoint" diff --git a/hnsnetwork.go b/hnsnetwork.go index f775fa1d07..25240d9ccc 100644 --- a/hnsnetwork.go +++ b/hnsnetwork.go @@ -4,11 +4,11 @@ import ( "github.com/Microsoft/hcsshim/internal/hns" ) -// Subnet is assoicated with a network and represents a list +// Subnet is associated with a network and represents a list // of subnets available to the network type Subnet = hns.Subnet -// MacPool is assoicated with a network and represents a list +// MacPool is associated with a network and represents a list // of macaddresses available to the network type MacPool = hns.MacPool diff --git a/internal/clone/registry.go b/internal/clone/registry.go index ed5ef3dce4..67fb7ef077 100644 --- a/internal/clone/registry.go +++ b/internal/clone/registry.go @@ -98,7 +98,7 @@ func storePersistedUVMConfig(id string, encodedConfig []byte) error { } // removePersistedUVMConfig removes any persisted state associated with this config. If the config -// is not found in the registery `Remove` returns no error. +// is not found in the registry `Remove` returns no error. func removePersistedUVMConfig(id string) error { sk, err := regstate.Open(configRoot, false) if err != nil { diff --git a/internal/cni/registry.go b/internal/cni/registry.go index 4a4fcea843..2afcc6981c 100644 --- a/internal/cni/registry.go +++ b/internal/cni/registry.go @@ -84,7 +84,7 @@ func (pnc *PersistedNamespaceConfig) Store() error { } // Remove removes any persisted state associated with this config. If the config -// is not found in the registery `Remove` returns no error. +// is not found in the registry `Remove` returns no error. func (pnc *PersistedNamespaceConfig) Remove() error { if pnc.stored { sk, err := regstate.Open(cniRoot, false) From 2d6267f0072ac1bf53c5f1072a2793df5b7a2d97 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Tue, 1 Mar 2022 14:29:37 +0800 Subject: [PATCH 2/2] all: fix typos Signed-off-by: cuishuang --- test/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go | 4 ++-- .../github.com/Microsoft/hcsshim/hcn/hcnendpoint.go | 2 +- .../github.com/Microsoft/hcsshim/hcn/hcnerrors.go | 10 +++++----- .../github.com/Microsoft/hcsshim/hcn/hcnnamespace.go | 2 +- test/vendor/github.com/Microsoft/hcsshim/hnsnetwork.go | 4 ++-- .../Microsoft/hcsshim/internal/clone/registry.go | 2 +- .../Microsoft/hcsshim/internal/cni/registry.go | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go index df3a59a78c..fe3d13a052 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go +++ b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go @@ -228,7 +228,7 @@ func IPv6DualStackSupported() error { return platformDoesNotSupportError("IPv6 DualStack") } -//L4proxySupported returns an error if the HCN verison does not support L4Proxy +//L4proxySupported returns an error if the HCN version does not support L4Proxy func L4proxyPolicySupported() error { supported, err := GetCachedSupportedFeatures() if err != nil { @@ -240,7 +240,7 @@ func L4proxyPolicySupported() error { return platformDoesNotSupportError("L4ProxyPolicy") } -// L4WfpProxySupported returns an error if the HCN verison does not support L4WfpProxy +// L4WfpProxySupported returns an error if the HCN version does not support L4WfpProxy func L4WfpProxyPolicySupported() error { supported, err := GetCachedSupportedFeatures() if err != nil { diff --git a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnendpoint.go b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnendpoint.go index 545e8639d6..213cfe0b1f 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnendpoint.go +++ b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnendpoint.go @@ -9,7 +9,7 @@ import ( "github.com/sirupsen/logrus" ) -// IpConfig is assoicated with an endpoint +// IpConfig is associated with an endpoint type IpConfig struct { IpAddress string `json:",omitempty"` PrefixLength uint8 `json:",omitempty"` diff --git a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go index ad30d320d9..1d52d2e72a 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go +++ b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go @@ -90,7 +90,7 @@ func new(hr error, title string, rest string) error { // we wish to seperate them as they are shim usage error // -// NetworkNotFoundError results from a failed seach for a network by Id or Name +// NetworkNotFoundError results from a failed search for a network by Id or Name type NetworkNotFoundError struct { NetworkName string NetworkID string @@ -103,7 +103,7 @@ func (e NetworkNotFoundError) Error() string { return fmt.Sprintf("Network ID %q not found", e.NetworkID) } -// EndpointNotFoundError results from a failed seach for an endpoint by Id or Name +// EndpointNotFoundError results from a failed search for an endpoint by Id or Name type EndpointNotFoundError struct { EndpointName string EndpointID string @@ -116,7 +116,7 @@ func (e EndpointNotFoundError) Error() string { return fmt.Sprintf("Endpoint ID %q not found", e.EndpointID) } -// NamespaceNotFoundError results from a failed seach for a namsepace by Id +// NamespaceNotFoundError results from a failed search for a namsepace by Id type NamespaceNotFoundError struct { NamespaceID string } @@ -125,7 +125,7 @@ func (e NamespaceNotFoundError) Error() string { return fmt.Sprintf("Namespace ID %q not found", e.NamespaceID) } -// LoadBalancerNotFoundError results from a failed seach for a loadbalancer by Id +// LoadBalancerNotFoundError results from a failed search for a loadbalancer by Id type LoadBalancerNotFoundError struct { LoadBalancerId string } @@ -134,7 +134,7 @@ func (e LoadBalancerNotFoundError) Error() string { return fmt.Sprintf("LoadBalancer %q not found", e.LoadBalancerId) } -// RouteNotFoundError results from a failed seach for a route by Id +// RouteNotFoundError results from a failed search for a route by Id type RouteNotFoundError struct { RouteId string } diff --git a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go index d2ef229609..12e69de9cc 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go +++ b/test/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go @@ -27,7 +27,7 @@ type NamespaceResourceContainer struct { type NamespaceResourceType string var ( - // NamespaceResourceTypeContainer are contianers associated with a Namespace. + // NamespaceResourceTypeContainer are containers associated with a Namespace. NamespaceResourceTypeContainer NamespaceResourceType = "Container" // NamespaceResourceTypeEndpoint are endpoints associated with a Namespace. NamespaceResourceTypeEndpoint NamespaceResourceType = "Endpoint" diff --git a/test/vendor/github.com/Microsoft/hcsshim/hnsnetwork.go b/test/vendor/github.com/Microsoft/hcsshim/hnsnetwork.go index f775fa1d07..25240d9ccc 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/hnsnetwork.go +++ b/test/vendor/github.com/Microsoft/hcsshim/hnsnetwork.go @@ -4,11 +4,11 @@ import ( "github.com/Microsoft/hcsshim/internal/hns" ) -// Subnet is assoicated with a network and represents a list +// Subnet is associated with a network and represents a list // of subnets available to the network type Subnet = hns.Subnet -// MacPool is assoicated with a network and represents a list +// MacPool is associated with a network and represents a list // of macaddresses available to the network type MacPool = hns.MacPool diff --git a/test/vendor/github.com/Microsoft/hcsshim/internal/clone/registry.go b/test/vendor/github.com/Microsoft/hcsshim/internal/clone/registry.go index ed5ef3dce4..67fb7ef077 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/internal/clone/registry.go +++ b/test/vendor/github.com/Microsoft/hcsshim/internal/clone/registry.go @@ -98,7 +98,7 @@ func storePersistedUVMConfig(id string, encodedConfig []byte) error { } // removePersistedUVMConfig removes any persisted state associated with this config. If the config -// is not found in the registery `Remove` returns no error. +// is not found in the registry `Remove` returns no error. func removePersistedUVMConfig(id string) error { sk, err := regstate.Open(configRoot, false) if err != nil { diff --git a/test/vendor/github.com/Microsoft/hcsshim/internal/cni/registry.go b/test/vendor/github.com/Microsoft/hcsshim/internal/cni/registry.go index 4a4fcea843..2afcc6981c 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/internal/cni/registry.go +++ b/test/vendor/github.com/Microsoft/hcsshim/internal/cni/registry.go @@ -84,7 +84,7 @@ func (pnc *PersistedNamespaceConfig) Store() error { } // Remove removes any persisted state associated with this config. If the config -// is not found in the registery `Remove` returns no error. +// is not found in the registry `Remove` returns no error. func (pnc *PersistedNamespaceConfig) Remove() error { if pnc.stored { sk, err := regstate.Open(cniRoot, false)