chore: remove duplicate word in comments

Signed-off-by: Abirdcfly Fu <fp544037857@gmail.com>
This commit is contained in:
Abirdcfly
2022-08-29 10:43:55 +08:00
parent bf8cdc2918
commit dcfaa30ba2
7 changed files with 9 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ import (
)
// portForward uses netns to enter the sandbox namespace, and forwards a stream inside the
// the namespace to a specific port. It keeps forwarding until it exits or client disconnect.
// namespace to a specific port. It keeps forwarding until it exits or client disconnect.
func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
s, err := c.sandboxStore.Get(id)
if err != nil {
@@ -83,7 +83,7 @@ func (c *criService) portForward(ctx context.Context, id string, port int32, str
defer conn.Close()
errCh := make(chan error, 2)
// Copy from the the namespace port connection to the client stream
// Copy from the namespace port connection to the client stream
go func() {
log.G(ctx).Debugf("PortForward copying data from namespace %q port %d to the client stream", id, port)
_, err := io.Copy(stream, conn)

View File

@@ -28,7 +28,7 @@ import (
)
// portForward uses netns to enter the sandbox namespace, and forwards a stream inside the
// the namespace to a specific port. It keeps forwarding until it exits or client disconnect.
// namespace to a specific port. It keeps forwarding until it exits or client disconnect.
func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
return fmt.Errorf("port forward: %w", errdefs.ErrNotImplemented)
}

View File

@@ -30,7 +30,7 @@ import (
)
// portForward uses netns to enter the sandbox namespace, and forwards a stream inside the
// the namespace to a specific port. It keeps forwarding until it exits or client disconnect.
// namespace to a specific port. It keeps forwarding until it exits or client disconnect.
func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
s, err := c.sandboxStore.Get(id)
if err != nil {
@@ -83,7 +83,7 @@ func (c *criService) portForward(ctx context.Context, id string, port int32, str
defer conn.Close()
errCh := make(chan error, 2)
// Copy from the the namespace port connection to the client stream
// Copy from the namespace port connection to the client stream
go func() {
log.G(ctx).Debugf("PortForward copying data from namespace %q port %d to the client stream", id, port)
_, err := io.Copy(stream, conn)

View File

@@ -28,7 +28,7 @@ import (
)
// portForward uses netns to enter the sandbox namespace, and forwards a stream inside the
// the namespace to a specific port. It keeps forwarding until it exits or client disconnect.
// namespace to a specific port. It keeps forwarding until it exits or client disconnect.
func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
return fmt.Errorf("port forward: %w", errdefs.ErrNotImplemented)
}