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

@ -143,7 +143,7 @@ var WithAllCurrentCapabilities = func(ctx context.Context, client Client, c *con
return WithCapabilities(caps)(ctx, client, c, s) return WithCapabilities(caps)(ctx, client, c, s)
} }
// WithAllKnownCapabilities sets all the the known linux capabilities for the container process // WithAllKnownCapabilities sets all the known linux capabilities for the container process
var WithAllKnownCapabilities = func(ctx context.Context, client Client, c *containers.Container, s *Spec) error { var WithAllKnownCapabilities = func(ctx context.Context, client Client, c *containers.Container, s *Spec) error {
caps := cap.Known() caps := cap.Known()
return WithCapabilities(caps)(ctx, client, c, s) return WithCapabilities(caps)(ctx, client, c, s)

View File

@ -33,7 +33,7 @@ var WithAllCurrentCapabilities = func(ctx context.Context, client Client, c *con
return WithCapabilities(nil)(ctx, client, c, s) return WithCapabilities(nil)(ctx, client, c, s)
} }
// WithAllKnownCapabilities sets all the the known linux capabilities for the container process // WithAllKnownCapabilities sets all the known linux capabilities for the container process
// nolint: deadcode, unused // nolint: deadcode, unused
var WithAllKnownCapabilities = func(ctx context.Context, client Client, c *containers.Container, s *Spec) error { var WithAllKnownCapabilities = func(ctx context.Context, client Client, c *containers.Container, s *Spec) error {
return WithCapabilities(nil)(ctx, client, c, s) return WithCapabilities(nil)(ctx, client, c, s)

View File

@ -30,7 +30,7 @@ import (
) )
// portForward uses netns to enter the sandbox namespace, and forwards a stream inside the // 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 { func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
s, err := c.sandboxStore.Get(id) s, err := c.sandboxStore.Get(id)
if err != nil { if err != nil {
@ -83,7 +83,7 @@ func (c *criService) portForward(ctx context.Context, id string, port int32, str
defer conn.Close() defer conn.Close()
errCh := make(chan error, 2) 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() { go func() {
log.G(ctx).Debugf("PortForward copying data from namespace %q port %d to the client stream", id, port) log.G(ctx).Debugf("PortForward copying data from namespace %q port %d to the client stream", id, port)
_, err := io.Copy(stream, conn) _, 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 // 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 { func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
return fmt.Errorf("port forward: %w", errdefs.ErrNotImplemented) 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 // 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 { func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
s, err := c.sandboxStore.Get(id) s, err := c.sandboxStore.Get(id)
if err != nil { if err != nil {
@ -83,7 +83,7 @@ func (c *criService) portForward(ctx context.Context, id string, port int32, str
defer conn.Close() defer conn.Close()
errCh := make(chan error, 2) 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() { go func() {
log.G(ctx).Debugf("PortForward copying data from namespace %q port %d to the client stream", id, port) log.G(ctx).Debugf("PortForward copying data from namespace %q port %d to the client stream", id, port)
_, err := io.Copy(stream, conn) _, 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 // 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 { func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error {
return fmt.Errorf("port forward: %w", errdefs.ErrNotImplemented) return fmt.Errorf("port forward: %w", errdefs.ErrNotImplemented)
} }

View File

@ -28,7 +28,7 @@ cd "${ROOT}"
# FOCUS focuses the test to run. # FOCUS focuses the test to run.
FOCUS=${FOCUS:-""} FOCUS=${FOCUS:-""}
# REPORT_DIR is the the directory to store test logs. # REPORT_DIR is the directory to store test logs.
if [ $IS_WINDOWS -eq 0 ]; then if [ $IS_WINDOWS -eq 0 ]; then
REPORT_DIR=${REPORT_DIR:-"/tmp/test-integration"} REPORT_DIR=${REPORT_DIR:-"/tmp/test-integration"}
else else