From 07a5e924ce0a1ae7f376b2932355e0a2c62c71b3 Mon Sep 17 00:00:00 2001 From: Sahana Narasipura Vasudevarao Date: Tue, 31 Mar 2026 17:49:34 -0700 Subject: [PATCH] Fix typos and misspellings in comments, tests, and docs Signed-off-by: Sahana Narasipura Vasudevarao --- client/image_import.go | 2 +- client/service_logs.go | 2 +- client/task_logs.go | 2 +- contrib/otel/README.md | 2 +- daemon/cluster/controllers/plugin/controller_test.go | 2 +- daemon/cluster/convert/network.go | 4 ++-- daemon/cluster/executor/container/executor.go | 2 +- daemon/daemon.go | 2 +- daemon/images/image.go | 2 +- daemon/kill.go | 2 +- daemon/logger/loggerutils/logfile_test.go | 2 +- daemon/migration_test.go | 4 ++-- integration-cli/docker_api_swarm_service_test.go | 4 ++-- integration/daemon/daemon_test.go | 2 +- integration/volume/mount_test.go | 2 +- pkg/plugins/pluginrpc-gen/parser.go | 2 +- pkg/pools/pools_test.go | 2 +- vendor/github.com/moby/moby/client/image_import.go | 2 +- vendor/github.com/moby/moby/client/service_logs.go | 2 +- vendor/github.com/moby/moby/client/task_logs.go | 2 +- 20 files changed, 23 insertions(+), 23 deletions(-) diff --git a/client/image_import.go b/client/image_import.go index f383f76d49..6c9f22866f 100644 --- a/client/image_import.go +++ b/client/image_import.go @@ -39,7 +39,7 @@ func (cli *Client) ImageImport(ctx context.Context, source ImageImportSource, re query.Set("message", options.Message) } if p := formatPlatform(options.Platform); p != "unknown" { - // TODO(thaJeztah): would we ever support mutiple platforms here? (would require multiple rootfs tars as well?) + // TODO(thaJeztah): would we ever support multiple platforms here? (would require multiple rootfs tars as well?) query.Set("platform", p) } for _, change := range options.Changes { diff --git a/client/service_logs.go b/client/service_logs.go index 57099ffe46..911b63cb76 100644 --- a/client/service_logs.go +++ b/client/service_logs.go @@ -34,7 +34,7 @@ type ServiceLogsResult interface { // // The underlying [io.ReadCloser] is automatically closed if the context is canceled, func (cli *Client) ServiceLogs(ctx context.Context, serviceID string, options ServiceLogsOptions) (ServiceLogsResult, error) { - // TODO(thaJeztah): this function needs documentation about the format of ths stream (similar to for container logs) + // TODO(thaJeztah): this function needs documentation about the format of the stream (similar to for container logs) // TODO(thaJeztah): migrate CLI utilities to the client where suitable; https://github.com/docker/cli/blob/v29.0.0-rc.1/cli/command/service/logs.go#L73-L348 serviceID, err := trimID("service", serviceID) diff --git a/client/task_logs.go b/client/task_logs.go index e4de019f30..0174ad4650 100644 --- a/client/task_logs.go +++ b/client/task_logs.go @@ -32,7 +32,7 @@ type TaskLogsResult interface { // // The underlying [io.ReadCloser] is automatically closed if the context is canceled, func (cli *Client) TaskLogs(ctx context.Context, taskID string, options TaskLogsOptions) (TaskLogsResult, error) { - // TODO(thaJeztah): this function needs documentation about the format of ths stream (similar to for container logs) + // TODO(thaJeztah): this function needs documentation about the format of the stream (similar to for container logs) // TODO(thaJeztah): migrate CLI utilities to the client where suitable; https://github.com/docker/cli/blob/v29.0.0-rc.1/cli/command/service/logs.go#L73-L348 query := url.Values{} diff --git a/contrib/otel/README.md b/contrib/otel/README.md index 9d089475df..abfbc1a6b2 100644 --- a/contrib/otel/README.md +++ b/contrib/otel/README.md @@ -19,7 +19,7 @@ The `contrib/otel` directory contains the compose file with the services configu 5. Browse Jaeger at `http://localhost:16686` or the Aspire Dashboard at `http://localhost:18888/traces`; 6. To see some traces from the engine, select `dockerd` in the top left dropdown -> **Note**: The precise steps may vary based on how you're working on the codebase (buiding a binary and executing natively, running/debugging in a devcontainer, etc... ) +> **Note**: The precise steps may vary based on how you're working on the codebase (building a binary and executing natively, running/debugging in a devcontainer, etc... ) ## Cleanup? diff --git a/daemon/cluster/controllers/plugin/controller_test.go b/daemon/cluster/controllers/plugin/controller_test.go index a2500a9c27..e6500c5639 100644 --- a/daemon/cluster/controllers/plugin/controller_test.go +++ b/daemon/cluster/controllers/plugin/controller_test.go @@ -121,7 +121,7 @@ func TestWaitCancel(t *testing.T) { t.Fatal(err) } case <-time.After(10 * time.Second): - t.Fatal("timeout waiting for cancelation") + t.Fatal("timeout waiting for cancellation") } } diff --git a/daemon/cluster/convert/network.go b/daemon/cluster/convert/network.go index 529ac3c50a..018d020204 100644 --- a/daemon/cluster/convert/network.go +++ b/daemon/cluster/convert/network.go @@ -88,7 +88,7 @@ func ipamFromGRPC(i *swarmapi.IPAMOptions) *types.IPAMOptions { } for _, config := range i.Configs { - // Best-effort parse of user suppplied values that have + // Best-effort parse of user supplied values that have // been round-tripped through Swarm's Raft store. It is // far too late to reject bogus values. subnet, _ := netiputil.ParseCIDR(config.Subnet) @@ -162,7 +162,7 @@ func BasicNetworkFromGRPC(n swarmapi.Network) network.Network { } ipam.Config = make([]network.IPAMConfig, 0, len(n.IPAM.Configs)) for _, ic := range n.IPAM.Configs { - // Best-effort parse of user suppplied values that have + // Best-effort parse of user supplied values that have // been round-tripped through Swarm's Raft store. It is // far too late to reject bogus values. subnet, _ := netiputil.ParseCIDR(ic.Subnet) diff --git a/daemon/cluster/executor/container/executor.go b/daemon/cluster/executor/container/executor.go index a6ccac91c7..d371ac6fdd 100644 --- a/daemon/cluster/executor/container/executor.go +++ b/daemon/cluster/executor/container/executor.go @@ -186,7 +186,7 @@ func (e *executor) Configure(ctx context.Context, node *api.Node) error { // or has just had its IP changed (false) removeAttachments := make(map[string]bool) - // the first time we Configure, nodeObj wil be nil, because it will not be + // the first time we Configure, nodeObj will be nil, because it will not be // set yet. in that case, skip this check. if e.nodeObj != nil { for _, na := range e.nodeObj.Attachments { diff --git a/daemon/daemon.go b/daemon/daemon.go index e3c8947f5b..b41b92444e 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -268,7 +268,7 @@ func (daemon *Daemon) restore(ctx context.Context, cfg *configStore, containers log.G(ctx).Info("Restoring containers: start.") // parallelLimit is the maximum number of parallel startup jobs that we - // allow (this is the limited used for all startup semaphores). The multipler + // allow (this is the limited used for all startup semaphores). The multiplier // (128) was chosen after some fairly significant benchmarking -- don't change // it unless you've tested it significantly (this value is adjusted if // RLIMIT_NOFILE is small to avoid EMFILE). diff --git a/daemon/images/image.go b/daemon/images/image.go index 2ec71536b0..c932fe01d5 100644 --- a/daemon/images/image.go +++ b/daemon/images/image.go @@ -141,7 +141,7 @@ func (i *ImageService) manifestMatchesPlatform(ctx context.Context, img *image.I } if err := json.Unmarshal(data, &m); err != nil { - logger.WithError(err).Error("Error desserializing manifest") + logger.WithError(err).Error("Error deserializing manifest") continue } diff --git a/daemon/kill.go b/daemon/kill.go index cad91cd91f..675b594bad 100644 --- a/daemon/kill.go +++ b/daemon/kill.go @@ -193,7 +193,7 @@ func (daemon *Daemon) Kill(container *containerpkg.Container) error { return err } - // wait for container to exit one last time, if it doesn't then kill didnt work, so return error + // wait for container to exit one last time, if it doesn't then kill didn't work, so return error ctx2, cancel2 := context.WithTimeout(context.Background(), 2*time.Second) defer cancel2() diff --git a/daemon/logger/loggerutils/logfile_test.go b/daemon/logger/loggerutils/logfile_test.go index 7615c646b2..35544a28a4 100644 --- a/daemon/logger/loggerutils/logfile_test.go +++ b/daemon/logger/loggerutils/logfile_test.go @@ -133,7 +133,7 @@ func TestTailFiles(t *testing.T) { f1 := bytes.NewBuffer(nil) writeMsg(f1, msg1) - _, err := f1.WriteString("some randome garbage") + _, err := f1.WriteString("some random garbage") assert.NilError(t, err, "error writing garbage to log stream") writeMsg(f1, msg2) // This won't be seen due to garbage written above diff --git a/daemon/migration_test.go b/daemon/migration_test.go index 2fb6149de0..a294764b33 100644 --- a/daemon/migration_test.go +++ b/daemon/migration_test.go @@ -93,7 +93,7 @@ func TestContainerMigrateOS(t *testing.T) { }, }, { - name: "gd with an image thats no longer available", + name: "gd with missing image", ctr: Container{ ImageManifest: graphdrivers, ImageID: "notfound", @@ -119,7 +119,7 @@ func TestContainerMigrateOS(t *testing.T) { }, }, { - name: "c8d with an image thats no longer available", + name: "c8d with missing image", ctr: Container{ ImageManifest: &ocispec.Descriptor{ Digest: "notfound", diff --git a/integration-cli/docker_api_swarm_service_test.go b/integration-cli/docker_api_swarm_service_test.go index cc7e63ff46..d7e70701fc 100644 --- a/integration-cli/docker_api_swarm_service_test.go +++ b/integration-cli/docker_api_swarm_service_test.go @@ -185,7 +185,7 @@ func (s *DockerSwarmSuite) TestAPISwarmServicesUpdate(c *testing.T) { // 2nd batch poll.WaitOn(c, pollCheck(c, daemons[0].CheckRunningTaskImages(ctx), checker.DeepEquals(map[string]int{image1: instances - 2*parallelism, image2: 2 * parallelism})), poll.WithTimeout(defaultReconciliationTimeout)) - // 3nd batch + // 3rd batch poll.WaitOn(c, pollCheck(c, daemons[0].CheckRunningTaskImages(ctx), checker.DeepEquals(map[string]int{image2: instances})), poll.WithTimeout(defaultReconciliationTimeout)) // Roll back to the previous version. This uses the CLI because @@ -277,7 +277,7 @@ func (s *DockerSwarmSuite) TestAPISwarmServicesUpdateStartFirst(c *testing.T) { poll.WaitOn(c, pollCheck(c, d.CheckRunningTaskImages(ctx), checker.DeepEquals(map[string]int{image1: instances - 2*parallelism, image2: 2 * parallelism})), poll.WithTimeout(defaultReconciliationTimeout)) - // 3nd batch + // 3rd batch // The old tasks should be running, and the new ones should be starting. startingTasks = checkStartingTasks(1) diff --git a/integration/daemon/daemon_test.go b/integration/daemon/daemon_test.go index 2ec108e057..3f7153dbd7 100644 --- a/integration/daemon/daemon_test.go +++ b/integration/daemon/daemon_test.go @@ -508,7 +508,7 @@ func testLiveRestoreAutoRemove(t *testing.T) { return d, finishContainer, cID } - t.Run("engine restart shouldnt kill alive containers", func(t *testing.T) { + t.Run("engine restart shouldn't kill alive containers", func(t *testing.T) { d, finishContainer, cID := run(t) d.Restart(t, "--live-restore", "--iptables=false", "--ip6tables=false") diff --git a/integration/volume/mount_test.go b/integration/volume/mount_test.go index 70d852b2aa..ccd840265e 100644 --- a/integration/volume/mount_test.go +++ b/integration/volume/mount_test.go @@ -210,7 +210,7 @@ func TestRunMountImage(t *testing.T) { assert.ErrorContains(t, removeErr, fmt.Sprintf(`container %s is using its referenced image %s`, id[:12], imgId[:12])) } - // Test that the container servives a restart when mounted image is removed + // Test that the container survives a restart when mounted image is removed if tc.name == "image_remove_force" { _, stopErr := apiClient.ContainerStop(ctx, id, client.ContainerStopOptions{}) assert.NilError(t, stopErr) diff --git a/pkg/plugins/pluginrpc-gen/parser.go b/pkg/plugins/pluginrpc-gen/parser.go index 8989fb74fe..126a407544 100644 --- a/pkg/plugins/pluginrpc-gen/parser.go +++ b/pkg/plugins/pluginrpc-gen/parser.go @@ -93,7 +93,7 @@ func Parse(filePath string, objName string) (*ParsedPkg, error) { return nil, fmt.Errorf("could not find object %s in %s", objName, filePath) } if obj.Kind != ast.Typ { - return nil, fmt.Errorf("exected type, got %s", obj.Kind) + return nil, fmt.Errorf("expected type, got %s", obj.Kind) } spec, ok := obj.Decl.(*ast.TypeSpec) if !ok { diff --git a/pkg/pools/pools_test.go b/pkg/pools/pools_test.go index 3bef9b0b04..7b4185c686 100644 --- a/pkg/pools/pools_test.go +++ b/pkg/pools/pools_test.go @@ -116,7 +116,7 @@ func TestBufioWriterPoolPutAndGet(t *testing.T) { // recover it defer func() { if r := recover(); r == nil { - t.Fatal("Trying to flush the writter should have 'panicked', did not.") + t.Fatal("Trying to flush the writer should have 'panicked', did not.") } }() writer.Flush() diff --git a/vendor/github.com/moby/moby/client/image_import.go b/vendor/github.com/moby/moby/client/image_import.go index f383f76d49..6c9f22866f 100644 --- a/vendor/github.com/moby/moby/client/image_import.go +++ b/vendor/github.com/moby/moby/client/image_import.go @@ -39,7 +39,7 @@ func (cli *Client) ImageImport(ctx context.Context, source ImageImportSource, re query.Set("message", options.Message) } if p := formatPlatform(options.Platform); p != "unknown" { - // TODO(thaJeztah): would we ever support mutiple platforms here? (would require multiple rootfs tars as well?) + // TODO(thaJeztah): would we ever support multiple platforms here? (would require multiple rootfs tars as well?) query.Set("platform", p) } for _, change := range options.Changes { diff --git a/vendor/github.com/moby/moby/client/service_logs.go b/vendor/github.com/moby/moby/client/service_logs.go index 57099ffe46..911b63cb76 100644 --- a/vendor/github.com/moby/moby/client/service_logs.go +++ b/vendor/github.com/moby/moby/client/service_logs.go @@ -34,7 +34,7 @@ type ServiceLogsResult interface { // // The underlying [io.ReadCloser] is automatically closed if the context is canceled, func (cli *Client) ServiceLogs(ctx context.Context, serviceID string, options ServiceLogsOptions) (ServiceLogsResult, error) { - // TODO(thaJeztah): this function needs documentation about the format of ths stream (similar to for container logs) + // TODO(thaJeztah): this function needs documentation about the format of the stream (similar to for container logs) // TODO(thaJeztah): migrate CLI utilities to the client where suitable; https://github.com/docker/cli/blob/v29.0.0-rc.1/cli/command/service/logs.go#L73-L348 serviceID, err := trimID("service", serviceID) diff --git a/vendor/github.com/moby/moby/client/task_logs.go b/vendor/github.com/moby/moby/client/task_logs.go index e4de019f30..0174ad4650 100644 --- a/vendor/github.com/moby/moby/client/task_logs.go +++ b/vendor/github.com/moby/moby/client/task_logs.go @@ -32,7 +32,7 @@ type TaskLogsResult interface { // // The underlying [io.ReadCloser] is automatically closed if the context is canceled, func (cli *Client) TaskLogs(ctx context.Context, taskID string, options TaskLogsOptions) (TaskLogsResult, error) { - // TODO(thaJeztah): this function needs documentation about the format of ths stream (similar to for container logs) + // TODO(thaJeztah): this function needs documentation about the format of the stream (similar to for container logs) // TODO(thaJeztah): migrate CLI utilities to the client where suitable; https://github.com/docker/cli/blob/v29.0.0-rc.1/cli/command/service/logs.go#L73-L348 query := url.Values{}