Fix typos and misspellings in comments, tests, and docs

Signed-off-by: Sahana Narasipura Vasudevarao <nvsahanarao@gmail.com>
This commit is contained in:
Sahana Narasipura Vasudevarao
2026-03-31 17:49:34 -07:00
parent b8b9a0984c
commit 07a5e924ce
20 changed files with 23 additions and 23 deletions

View File

@@ -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 {

View File

@@ -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)

View File

@@ -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{}

View File

@@ -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?

View File

@@ -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")
}
}

View File

@@ -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)

View File

@@ -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 {

View File

@@ -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).

View File

@@ -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
}

View File

@@ -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()

View File

@@ -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

View File

@@ -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",

View File

@@ -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)

View File

@@ -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")

View File

@@ -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)

View File

@@ -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 {

View File

@@ -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()

View File

@@ -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 {

View File

@@ -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)

View File

@@ -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{}