From 5ebcd4d56eca3482c16fb07d3087e732e9677b9a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 5 Mar 2025 23:39:33 -0500 Subject: [PATCH 01/27] link: Combined Image JSON + Filesystem Changeset Format Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/legacy/tarball/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/legacy/tarball/README.md b/pkg/legacy/tarball/README.md index 90b88c757..b3c0168f1 100644 --- a/pkg/legacy/tarball/README.md +++ b/pkg/legacy/tarball/README.md @@ -3,4 +3,4 @@ [![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/legacy/tarball?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/legacy/tarball) This package implements support for writing legacy tarballs, as described -[here](https://github.com/moby/moby/blob/749d90e10f989802638ae542daf54257f3bf71f2/image/spec/v1.2.md#combined-image-json--filesystem-changeset-format). +in [Combined Image JSON + Filesystem Changeset Format](https://github.com/moby/moby/blob/749d90e10f989802638ae542daf54257f3bf71f2/image/spec/v1.2.md#combined-image-json--filesystem-changeset-format). From ea35d4b57b73660739a5d48e97bd58b726b2b016 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 5 Mar 2025 23:40:10 -0500 Subject: [PATCH 02/27] link: google/testdata/gcloud/credentials Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/google/testdata/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/google/testdata/README.md b/pkg/v1/google/testdata/README.md index 12222aa7f..233de282c 100644 --- a/pkg/v1/google/testdata/README.md +++ b/pkg/v1/google/testdata/README.md @@ -1,4 +1,4 @@ # testdata -This key is cribbed from [here](https://github.com/golang/oauth2/blob/d668ce993890a79bda886613ee587a69dd5da7a6/google/testdata/gcloud/credentials). +This key is cribbed from [google/testdata/gcloud/credentials](https://github.com/golang/oauth2/blob/d668ce993890a79bda886613ee587a69dd5da7a6/google/testdata/gcloud/credentials). It's invalid but parses sufficiently to test `NewEnvAuthenticator`. From a98d7a83f61532aa727b055bca6f7fe319867fc7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:06:45 -0500 Subject: [PATCH 03/27] link: legacy/copy.go Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/README.md b/pkg/v1/remote/README.md index c1e81b310..4540b80d8 100644 --- a/pkg/v1/remote/README.md +++ b/pkg/v1/remote/README.md @@ -114,4 +114,4 @@ however, it's possible to do _something_ useful with them via [`remote.Get`](htt which doesn't try to interpret what is returned by the registry. [`crane.Copy`](https://godoc.org/github.com/google/go-containerregistry/pkg/crane#Copy) takes advantage of this to implement support for copying schema 1 images, -see [here](https://github.com/google/go-containerregistry/blob/main/pkg/internal/legacy/copy.go). +see [legacy/copy.go](https://github.com/google/go-containerregistry/blob/ba53fa10e72c7373ef8068e21c9f102f0c20a940/pkg/internal/legacy/copy.go). From c0cffb6cf9ba7c03286da24a3d460407187af172 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:07:16 -0500 Subject: [PATCH 04/27] link: private Google drawing Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- cmd/crane/rebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/crane/rebase.md b/cmd/crane/rebase.md index 1a68ea832..a1c856d57 100644 --- a/cmd/crane/rebase.md +++ b/cmd/crane/rebase.md @@ -5,7 +5,7 @@ is `FROM` with a new base image. ![rebase visualization](./rebase.png) -([link](https://docs.google.com/drawings/d/1w8UxTZDRbDWVoqnbr17SJuU73pRxpOmOk_vzmC9WB2k/edit)) +([private Google drawing](https://docs.google.com/drawings/d/1w8UxTZDRbDWVoqnbr17SJuU73pRxpOmOk_vzmC9WB2k/edit)) **This is not safe in general**, but it can be extremely useful for platform providers, e.g. when a vulnerability is discovered in a base layer and many From 7eb6d351be522813f847973a1427ad5ad32def62 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 5 Mar 2025 23:39:14 -0500 Subject: [PATCH 05/27] link: recipes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- cmd/crane/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/crane/README.md b/cmd/crane/README.md index a05dbeb3c..5840afba3 100644 --- a/cmd/crane/README.md +++ b/cmd/crane/README.md @@ -5,7 +5,7 @@ and registries. -A collection of useful things you can do with `crane` is [here](recipes.md). +A collection of useful things you can do with `crane` is [recipes](recipes.md). ## Installation From fc7849752cb881e50855c84e20c90e1348f3e418 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 09:55:29 -0500 Subject: [PATCH 06/27] spelling: actually compressed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/partial/compressed.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/partial/compressed.go b/pkg/v1/partial/compressed.go index 44989ac96..69a979418 100644 --- a/pkg/v1/partial/compressed.go +++ b/pkg/v1/partial/compressed.go @@ -54,7 +54,7 @@ func (cle *compressedLayerExtender) Uncompressed() (io.ReadCloser, error) { return nil, err } - // Often, the "compressed" bytes are not actually-compressed. + // Often, the "compressed" bytes are not actually compressed. // Peek at the first two bytes to determine whether it's correct to // wrap this with gzip.UnzipReadCloser or zstd.UnzipReadCloser. cp, pr, err := compression.PeekCompression(rc) From 708fbe41cc18c3aa5e9a9b497b9181a7118ac027 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 5 Mar 2025 23:38:23 -0500 Subject: [PATCH 07/27] spelling: and Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/referrers_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/referrers_test.go b/pkg/v1/remote/referrers_test.go index 7fb566a88..8a3471612 100644 --- a/pkg/v1/remote/referrers_test.go +++ b/pkg/v1/remote/referrers_test.go @@ -187,7 +187,7 @@ func TestReferrers(t *testing.T) { t.Fatalf("referrers diff after second push (-want,+got): %s", d) } - // Try applying filters and verify number of manifests and and annotations + // Try applying filters and verify number of manifests and annotations index, err = remote.Referrers(rootRefDigest, remote.WithFilter("artifactType", "application/testing123")) if err != nil { From 3385db66b45ef919eef6bf548fa5041e146f9eda Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:19:21 -0500 Subject: [PATCH 08/27] spelling: attaches Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/transport/transport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/transport/transport.go b/pkg/v1/remote/transport/transport.go index bd539b44f..19bb94d63 100644 --- a/pkg/v1/remote/transport/transport.go +++ b/pkg/v1/remote/transport/transport.go @@ -51,7 +51,7 @@ func NewWithContext(ctx context.Context, reg name.Registry, auth authn.Authentic // 2a. If we get back a 200, then simply use "t". // // 2b. If we get back a 401 with a Basic challenge, then use a transport - // that just attachs auth each roundtrip. + // that just attaches auth each roundtrip. // // 2c. If we get back a 401 with a Bearer challenge, then use a transport // that attaches a bearer token to each request, and refreshes is on 401s. From 484146dfc1ad76ed20b5dccb90bd3ede04bf6264 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:25:19 -0500 Subject: [PATCH 09/27] spelling: case-sensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/index_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/index_test.go b/pkg/v1/remote/index_test.go index 1b4b5cf1e..1962ef075 100644 --- a/pkg/v1/remote/index_test.go +++ b/pkg/v1/remote/index_test.go @@ -355,7 +355,7 @@ func TestMatchesPlatform(t *testing.T) { }, want: false, }, - { // OS must exactly match, and is case sensative. matchesPlatform expected to return false. + { // OS must exactly match, and is case-sensitive. matchesPlatform expected to return false. given: v1.Platform{ Architecture: "arm", OS: "linux", From 9d4061d0adf8dac832d0af8de1e3e19d4e7ee949 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 08:45:54 -0500 Subject: [PATCH 10/27] spelling: cataloger Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- cmd/crane/cmd/catalog.go | 6 +++--- pkg/v1/remote/catalog.go | 6 +++--- pkg/v1/remote/puller.go | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmd/crane/cmd/catalog.go b/cmd/crane/cmd/catalog.go index f17941d2d..dabebbece 100644 --- a/cmd/crane/cmd/catalog.go +++ b/cmd/crane/cmd/catalog.go @@ -55,13 +55,13 @@ func catalog(ctx context.Context, w io.Writer, src string, fullRef bool, o crane return err } - catalogger, err := puller.Catalogger(ctx, reg) + cataloger, err := puller.Cataloger(ctx, reg) if err != nil { return fmt.Errorf("reading tags for %s: %w", reg, err) } - for catalogger.HasNext() { - repos, err := catalogger.Next(ctx) + for cataloger.HasNext() { + repos, err := cataloger.Next(ctx) if err != nil { return err } diff --git a/pkg/v1/remote/catalog.go b/pkg/v1/remote/catalog.go index a0281b9fd..b09f0f56f 100644 --- a/pkg/v1/remote/catalog.go +++ b/pkg/v1/remote/catalog.go @@ -134,7 +134,7 @@ func (f *fetcher) catalogPage(ctx context.Context, reg name.Registry, next strin return &parsed, nil } -type Catalogger struct { +type Cataloger struct { f *fetcher reg name.Registry pageSize int @@ -145,7 +145,7 @@ type Catalogger struct { needMore bool } -func (l *Catalogger) Next(ctx context.Context) (*Catalogs, error) { +func (l *Cataloger) Next(ctx context.Context) (*Catalogs, error) { if l.needMore { l.page, l.err = l.f.catalogPage(ctx, l.reg, l.page.Next, l.pageSize) } else { @@ -154,6 +154,6 @@ func (l *Catalogger) Next(ctx context.Context) (*Catalogs, error) { return l.page, l.err } -func (l *Catalogger) HasNext() bool { +func (l *Cataloger) HasNext() bool { return l.page != nil && (!l.needMore || l.page.Next != "") } diff --git a/pkg/v1/remote/puller.go b/pkg/v1/remote/puller.go index 7da8017ee..c564d2870 100644 --- a/pkg/v1/remote/puller.go +++ b/pkg/v1/remote/puller.go @@ -175,13 +175,13 @@ func (p *Puller) Catalog(ctx context.Context, reg name.Registry) ([]string, erro } func (p *Puller) catalog(ctx context.Context, reg name.Registry, pageSize int) ([]string, error) { - catalogger, err := p.catalogger(ctx, reg, pageSize) + cataloger, err := p.cataloger(ctx, reg, pageSize) if err != nil { return nil, err } repoList := []string{} - for catalogger.HasNext() { - repos, err := catalogger.Next(ctx) + for cataloger.HasNext() { + repos, err := cataloger.Next(ctx) if err != nil { return nil, err } @@ -190,12 +190,12 @@ func (p *Puller) catalog(ctx context.Context, reg name.Registry, pageSize int) ( return repoList, nil } -// Catalogger lists repos in a registry and returns a Catalogger for paginating through the results. -func (p *Puller) Catalogger(ctx context.Context, reg name.Registry) (*Catalogger, error) { - return p.catalogger(ctx, reg, p.o.pageSize) +// Cataloger lists repos in a registry and returns a Cataloger for paginating through the results. +func (p *Puller) Cataloger(ctx context.Context, reg name.Registry) (*Cataloger, error) { + return p.cataloger(ctx, reg, p.o.pageSize) } -func (p *Puller) catalogger(ctx context.Context, reg name.Registry, pageSize int) (*Catalogger, error) { +func (p *Puller) cataloger(ctx context.Context, reg name.Registry, pageSize int) (*Cataloger, error) { f, err := p.fetcher(ctx, reg) if err != nil { return nil, err @@ -204,7 +204,7 @@ func (p *Puller) catalogger(ctx context.Context, reg name.Registry, pageSize int if err != nil { return nil, err } - return &Catalogger{ + return &Cataloger{ f: f, reg: reg, pageSize: pageSize, From df8cb7799a80b564d018d322127b3e989916beab Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:20:20 -0500 Subject: [PATCH 11/27] spelling: dedup Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/pusher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/pusher.go b/pkg/v1/remote/pusher.go index 332d8ca0a..ac323e726 100644 --- a/pkg/v1/remote/pusher.go +++ b/pkg/v1/remote/pusher.go @@ -315,7 +315,7 @@ func (rw *repoWriter) writeManifest(ctx context.Context, ref name.Reference, t T } // For tags, we want to do this check outside of our Work.Do closure because - // we don't want to dedupe based on the manifest digest. + // we don't want to dedup based on the manifest digest. _, byTag := ref.(name.Tag) if byTag { if exists, err := rw.manifestExists(ctx, ref, t); err != nil { From cb98849f439d418fcad403fd12a277f137aca36b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:20:33 -0500 Subject: [PATCH 12/27] spelling: descriptor Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/image_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/image_test.go b/pkg/v1/remote/image_test.go index f15e96a6d..520e16bad 100644 --- a/pkg/v1/remote/image_test.go +++ b/pkg/v1/remote/image_test.go @@ -476,7 +476,7 @@ func TestPullingManifestList(t *testing.T) { } if diff := cmp.Diff(*desc.Platform, fakePlatform); diff != "" { - t.Errorf("Desciptor() (-want +got) = %v", diff) + t.Errorf("Descriptor() (-want +got) = %v", diff) } } From 028699ef0fcfa5acf1c44271ec5be0a46ea5ee78 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:19:01 -0500 Subject: [PATCH 13/27] spelling: easier Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- internal/retry/retry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/retry/retry.go b/internal/retry/retry.go index c9e356450..a2e770efa 100644 --- a/internal/retry/retry.go +++ b/internal/retry/retry.go @@ -25,7 +25,7 @@ import ( ) // Backoff is an alias of our own wait.Backoff to avoid name conflicts with -// the kubernetes wait package. Typing retry.Backoff is aesier than fixing +// the kubernetes wait package. Typing retry.Backoff is easier than fixing // the wrong import every time you use wait.Backoff. type Backoff = wait.Backoff From 598fcfd0bbfdc9112cb96613d6ad9d86942d499f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:20:52 -0500 Subject: [PATCH 14/27] spelling: elastic Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/authn/k8schain/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/authn/k8schain/README.md b/pkg/authn/k8schain/README.md index 0bf43712e..ba4d4b3fd 100644 --- a/pkg/authn/k8schain/README.md +++ b/pkg/authn/k8schain/README.md @@ -4,7 +4,7 @@ This is an implementation of the [`authn.Keychain`](https://godoc.org/github.com This keychain supports passing a Kubernetes Service Account and some ImagePullSecrets which may represent registry credentials. -In addition to those, the keychain also includes cloud-specific credential helpers for Google Container Registry (and Artifact Registry), Azure Container Registry, and Amazon AWS Elasic Container Registry. +In addition to those, the keychain also includes cloud-specific credential helpers for Google Container Registry (and Artifact Registry), Azure Container Registry, and Amazon AWS Elastic Container Registry. This means that if the keychain is used from within Kubernetes services on those clouds (GKE, AKS, EKS), any available service credentials will be discovered and used. In general this keychain should be used when the code is expected to run in a Kubernetes cluster, and especially when it will run in one of those clouds. From e75f58a53c87a0c9c1341a656765db8736b84730 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:21:18 -0500 Subject: [PATCH 15/27] spelling: example Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- internal/depcheck/depcheck.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/depcheck/depcheck.go b/internal/depcheck/depcheck.go index ba2466536..793bc7e4d 100644 --- a/internal/depcheck/depcheck.go +++ b/internal/depcheck/depcheck.go @@ -48,7 +48,7 @@ func (g graph) order() []string { return order } -// path constructs an examplary path that looks something like: +// path constructs an example path that looks something like: // // knative.dev/pkg/apis/duck // knative.dev/pkg/apis # Also: [knative.dev/pkg/kmeta knative.dev/pkg/tracker] From 0a1a73688dc103366868e255d09f00292ab17d65 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 09:55:09 -0500 Subject: [PATCH 16/27] spelling: fully qualified Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/name/ref.go | 2 +- pkg/v1/remote/write.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/name/ref.go b/pkg/name/ref.go index 0a0486772..089ef99b9 100644 --- a/pkg/name/ref.go +++ b/pkg/name/ref.go @@ -29,7 +29,7 @@ type Reference interface { // Identifier accesses the type-specific portion of the reference. Identifier() string - // Name is the fully-qualified reference name. + // Name is the fully qualified reference name. Name() string // Scope is the scope needed to access this reference. diff --git a/pkg/v1/remote/write.go b/pkg/v1/remote/write.go index 1167cb793..36a07a5e0 100644 --- a/pkg/v1/remote/write.go +++ b/pkg/v1/remote/write.go @@ -135,7 +135,7 @@ func (w *writer) maybeUpdateScopes(ctx context.Context, ml *MountableLayer) erro return nil } -// nextLocation extracts the fully-qualified URL to which we should send the next request in an upload sequence. +// nextLocation extracts the fully qualified URL to which we should send the next request in an upload sequence. func (w *writer) nextLocation(resp *http.Response) (string, error) { loc := resp.Header.Get("Location") if len(loc) == 0 { From 9634fd9fd6b3a336210e04396fed77c400afffb7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 07:46:46 -0500 Subject: [PATCH 17/27] spelling: indexes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/partial/index_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/v1/partial/index_test.go b/pkg/v1/partial/index_test.go index 4a3518665..b117525e9 100644 --- a/pkg/v1/partial/index_test.go +++ b/pkg/v1/partial/index_test.go @@ -107,11 +107,11 @@ func TestFindIndexes(t *testing.T) { // just see if it finds all of the indexes matcher := func(v1.Descriptor) bool { return true } index := mutate.AppendManifests(base, adds...) - idxes, err := partial.FindIndexes(index, matcher) + indexes, err := partial.FindIndexes(index, matcher) switch { case err != nil: t.Error("unexpected error:", err) - case len(idxes) != indexCount: - t.Errorf("failed on index, actual %d, expected %d", len(idxes), indexCount) + case len(indexes) != indexCount: + t.Errorf("failed on index, actual %d, expected %d", len(indexes), indexCount) } } From 824545cc14931f0f8d7e86db05387a38ad2b5074 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:22:09 -0500 Subject: [PATCH 18/27] spelling: initiate Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/write_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/v1/remote/write_test.go b/pkg/v1/remote/write_test.go index 229518f59..752ff5242 100644 --- a/pkg/v1/remote/write_test.go +++ b/pkg/v1/remote/write_test.go @@ -257,7 +257,7 @@ func TestInitiateUploadNoMountsExists(t *testing.T) { _, mounted, err := w.initiateUpload(context.Background(), "baz/bar", h.String(), "") if err != nil { - t.Errorf("intiateUpload() = %v", err) + t.Errorf("initiateUpload() = %v", err) } if !mounted { t.Error("initiateUpload() = !mounted, want mounted") @@ -295,7 +295,7 @@ func TestInitiateUploadNoMountsInitiated(t *testing.T) { location, mounted, err := w.initiateUpload(context.Background(), "baz/bar", h.String(), "") if err != nil { - t.Errorf("intiateUpload() = %v", err) + t.Errorf("initiateUpload() = %v", err) } if mounted { t.Error("initiateUpload() = mounted, want !mounted") @@ -344,7 +344,7 @@ func TestInitiateUploadNoMountsBadStatus(t *testing.T) { location, mounted, err := w.initiateUpload(context.Background(), "baz/bar", h.String(), "") if err == nil { - t.Errorf("intiateUpload() = %v, %v; wanted error", location, mounted) + t.Errorf("initiateUpload() = %v, %v; wanted error", location, mounted) } } @@ -377,7 +377,7 @@ func TestInitiateUploadMountsWithMountFromDifferentRegistry(t *testing.T) { _, mounted, err := w.initiateUpload(context.Background(), "baz/bar", h.String(), "") if err != nil { - t.Errorf("intiateUpload() = %v", err) + t.Errorf("initiateUpload() = %v", err) } if !mounted { t.Error("initiateUpload() = !mounted, want mounted") @@ -417,7 +417,7 @@ func TestInitiateUploadMountsWithMountFromTheSameRegistry(t *testing.T) { _, mounted, err := w.initiateUpload(context.Background(), expectedMountRepo, h.String(), "") if err != nil { - t.Errorf("intiateUpload() = %v", err) + t.Errorf("initiateUpload() = %v", err) } if !mounted { t.Error("initiateUpload() = !mounted, want mounted") @@ -459,7 +459,7 @@ func TestInitiateUploadMountsWithOrigin(t *testing.T) { _, mounted, err := w.initiateUpload(context.Background(), expectedMountRepo, h.String(), "fakeOrigin") if err != nil { - t.Errorf("intiateUpload() = %v", err) + t.Errorf("initiateUpload() = %v", err) } if !mounted { t.Error("initiateUpload() = !mounted, want mounted") @@ -509,7 +509,7 @@ func TestInitiateUploadMountsWithOriginFallback(t *testing.T) { _, mounted, err := w.initiateUpload(context.Background(), expectedMountRepo, h.String(), "fakeOrigin") if err != nil { - t.Errorf("intiateUpload() = %v", err) + t.Errorf("initiateUpload() = %v", err) } if !mounted { t.Error("initiateUpload() = !mounted, want mounted") From ee9d8d3716631f2a6e8be4d0febef1f68b2a32ff Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:22:01 -0500 Subject: [PATCH 19/27] spelling: intentionally Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/options.go b/pkg/v1/remote/options.go index 99a2bb2eb..80d5cfdae 100644 --- a/pkg/v1/remote/options.go +++ b/pkg/v1/remote/options.go @@ -336,7 +336,7 @@ func WithFilter(key string, value string) Option { // when possible and avoid sending redundant HEAD requests. // // Reuse will take precedence over other options passed to most remote functions because -// most options deal with setting up auth and transports, which Reuse intetionally skips. +// most options deal with setting up auth and transports, which Reuse intentionally skips. func Reuse[I *Puller | *Pusher](i I) Option { return func(o *options) error { if puller, ok := any(i).(*Puller); ok { From c5f62fbf996001763a63097a54b82759e7c71989 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:22:58 -0500 Subject: [PATCH 20/27] spelling: manifest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/multi_write_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/v1/remote/multi_write_test.go b/pkg/v1/remote/multi_write_test.go index a628e5881..2397d76c2 100644 --- a/pkg/v1/remote/multi_write_test.go +++ b/pkg/v1/remote/multi_write_test.go @@ -136,7 +136,7 @@ func TestMultiWrite(t *testing.T) { } } - // Check that tagged manfest list is present and valid. + // Check that tagged manifest list is present and valid. got, err := Index(tag3) if err != nil { t.Fatal(err) @@ -352,7 +352,7 @@ func TestMultiWrite_Deep(t *testing.T) { t.Error("Write:", err) } - // Check that tagged manfest list is present and valid. + // Check that tagged manifest list is present and valid. got, err := Index(tag) if err != nil { t.Fatal(err) From a76f7823c8d3305ab5840183f22bce9fabcb0699 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:23:06 -0500 Subject: [PATCH 21/27] spelling: messages Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/descriptor_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/descriptor_test.go b/pkg/v1/remote/descriptor_test.go index c0e6fa257..44ffbc117 100644 --- a/pkg/v1/remote/descriptor_test.go +++ b/pkg/v1/remote/descriptor_test.go @@ -245,7 +245,7 @@ type errTransport struct{} func (errTransport) RoundTrip(req *http.Request) (*http.Response, error) { // This simulates a registry that returns a redirect upon the first // request, and then returns an error upon subsequent requests. This helps - // test whether error redaction takes into account URLs in error messasges + // test whether error redaction takes into account URLs in error messages // that are not the original request URL. if req.URL.Host == "original.com" { return &http.Response{ From c0f2641107eb3b4dea6b78527483028fe8ca755c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:07:27 -0500 Subject: [PATCH 22/27] spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/crane/crane_test.go | 2 +- pkg/registry/registry_test.go | 8 ++++---- pkg/v1/layout/write_test.go | 2 +- pkg/v1/mutate/rebase.go | 2 +- pkg/v1/remote/check_e2e_test.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/crane/crane_test.go b/pkg/crane/crane_test.go index b46205530..cbe58dce0 100644 --- a/pkg/crane/crane_test.go +++ b/pkg/crane/crane_test.go @@ -178,7 +178,7 @@ func TestCraneRegistry(t *testing.T) { t.Fatalf("wanted 6 tags, got %d", len(tags)) } - // Delete the non existing image + // Delete the nonexistent image if err := crane.Delete(dst + ":honk-image"); err == nil { t.Fatal("wanted err, got nil") } diff --git a/pkg/registry/registry_test.go b/pkg/registry/registry_test.go index b14063bb3..5324d8254 100644 --- a/pkg/registry/registry_test.go +++ b/pkg/registry/registry_test.go @@ -90,13 +90,13 @@ func TestCalls(t *testing.T) { Header: map[string]string{"Docker-Distribution-API-Version": "registry/2.0"}, }, { - Description: "GET non existent blob", + Description: "GET nonexistent blob", Method: "GET", URL: "/v2/foo/blobs/sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae", Code: http.StatusNotFound, }, { - Description: "HEAD non existent blob", + Description: "HEAD nonexistent blob", Method: "HEAD", URL: "/v2/foo/blobs/sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae", Code: http.StatusNotFound, @@ -461,7 +461,7 @@ func TestCalls(t *testing.T) { Want: `{"name":"foo","tags":["tag1"]}`, }, { - Description: "list non existing tags", + Description: "list nonexistent tags", Method: "GET", URL: "/v2/foo/tags/list?n=1000", Code: http.StatusNotFound, @@ -493,7 +493,7 @@ func TestCalls(t *testing.T) { Code: http.StatusOK, Manifests: map[string]string{ "foo/manifests/image": "foo", - "foo/manifests/points-to-image": "{\"subject\": {\"digest\": \"sha256:" + sha256String("nonexistant") + "\"}}", + "foo/manifests/points-to-image": "{\"subject\": {\"digest\": \"sha256:" + sha256String("nonexistent") + "\"}}", }, Header: map[string]string{ "Content-Type": "application/vnd.oci.image.index.v1+json", diff --git a/pkg/v1/layout/write_test.go b/pkg/v1/layout/write_test.go index 530e0e8ea..277f65dd1 100644 --- a/pkg/v1/layout/write_test.go +++ b/pkg/v1/layout/write_test.go @@ -79,7 +79,7 @@ func TestAppendDescriptorInitializesIndex(t *testing.T) { t.Fatal(err) } - // Append a descriptor to a non-existent layout. + // Append a descriptor to a nonexistent layout. desc := v1.Descriptor{ Digest: bogusDigest, Size: 1337, diff --git a/pkg/v1/mutate/rebase.go b/pkg/v1/mutate/rebase.go index c606e0b76..6fcedb1df 100644 --- a/pkg/v1/mutate/rebase.go +++ b/pkg/v1/mutate/rebase.go @@ -133,7 +133,7 @@ func createAddendums(startHistory, startLayer int, history []v1.History, layers }) } } - // In the event history was malformed or non-existent, append the remaining layers. + // In the event history was malformed or nonexistent, append the remaining layers. for i := layerIndex; i < len(layers); i++ { if i >= startLayer { adds = append(adds, Addendum{Layer: layers[layerIndex]}) diff --git a/pkg/v1/remote/check_e2e_test.go b/pkg/v1/remote/check_e2e_test.go index a30223097..a8627d3b7 100644 --- a/pkg/v1/remote/check_e2e_test.go +++ b/pkg/v1/remote/check_e2e_test.go @@ -32,7 +32,7 @@ func TestCheckPushPermission_Real(t *testing.T) { name.MustParseReference("ubuntu"), name.MustParseReference("google/cloud-sdk"), name.MustParseReference("microsoft/dotnet:sdk"), - name.MustParseReference("gcr.io/non-existent-project/made-up"), + name.MustParseReference("gcr.io/nonexistent-project/made-up"), name.MustParseReference("gcr.io/google-containers/foo"), name.MustParseReference("quay.io/username/reponame"), } { From 67514c7c0b9e3e92e591e10f91d4258b0a78146b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 07:50:37 -0500 Subject: [PATCH 23/27] spelling: oauth Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/google/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/google/auth.go b/pkg/v1/google/auth.go index 4e64eda43..aff6995af 100644 --- a/pkg/v1/google/auth.go +++ b/pkg/v1/google/auth.go @@ -149,7 +149,7 @@ type gcloudSource struct { exec func(ctx context.Context) *exec.Cmd } -// Token implements oauath2.TokenSource. +// Token implements oauth2.TokenSource. func (gs gcloudSource) Token() (*oauth2.Token, error) { cmd := gs.exec(gs.ctx) var out bytes.Buffer From 2ab581e9e1e792bef0982dc16c1764f856d519eb Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:24:01 -0500 Subject: [PATCH 24/27] spelling: ordered Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/v1/remote/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/README.md b/pkg/v1/remote/README.md index 4540b80d8..0845b722f 100644 --- a/pkg/v1/remote/README.md +++ b/pkg/v1/remote/README.md @@ -50,7 +50,7 @@ There are a lot of confusingly similar terms that come up when talking about ima In general... * A tag refers to an image manifest. -* An image manifest references a config file and an orderered list of _compressed_ layers by sha256 digest. +* An image manifest references a config file and an ordered list of _compressed_ layers by sha256 digest. * A config file references an ordered list of _uncompressed_ layers by sha256 digest and contains runtime configuration. * The sha256 digest of the config file is the [image id](https://github.com/opencontainers/image-spec/blob/master/config.md#imageid) for the image. From ee903b03c6d1e9a82ab36170d6f5ae9be3dd169d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:24:25 -0500 Subject: [PATCH 25/27] spelling: prioritize Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/authn/kubernetes/keychain_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/authn/kubernetes/keychain_test.go b/pkg/authn/kubernetes/keychain_test.go index e01577115..e6cc486a2 100644 --- a/pkg/authn/kubernetes/keychain_test.go +++ b/pkg/authn/kubernetes/keychain_test.go @@ -228,7 +228,7 @@ func TestSecretAttachedServiceAccount(t *testing.T) { } -// Prioritze picking the first secret +// Prioritize picking the first secret func TestSecretPriority(t *testing.T) { secrets := []corev1.Secret{ *dockerCfgSecretType.Create(t, "ns", "secret", "fake.registry.io", authn.AuthConfig{ From 90cbc7ae10be115390ea61965d1925357ec83980 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 5 Mar 2025 23:38:59 -0500 Subject: [PATCH 26/27] spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/crane/append.go | 2 +- pkg/v1/remote/transport/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/crane/append.go b/pkg/crane/append.go index 0997322df..dc6cc6940 100644 --- a/pkg/crane/append.go +++ b/pkg/crane/append.go @@ -36,7 +36,7 @@ func isWindows(img v1.Image) (bool, error) { return cfg != nil && cfg.OS == "windows", nil } -// Append reads a layer from path and appends it the the v1.Image base. +// Append reads a layer from path and appends it the v1.Image base. // // If the base image is a Windows base image (i.e., its config.OS is // "windows"), the contents of the tarballs will be modified to be suitable for diff --git a/pkg/v1/remote/transport/README.md b/pkg/v1/remote/transport/README.md index bd4d957b0..a04517e25 100644 --- a/pkg/v1/remote/transport/README.md +++ b/pkg/v1/remote/transport/README.md @@ -40,7 +40,7 @@ Similar reasons! That ends up pulling in grpc, protobuf, and logrus. > Well... what about [`containers/image`](https://godoc.org/github.com/containers/image/docker)? -That just uses the the `docker/distribution` client... and more! +That just uses the `docker/distribution` client... and more! ![containers/image](../../../../images/containers.dot.svg) From 78b93dd71c3e792ac70bcc336f09d5ddb5f8802d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 5 Mar 2025 23:38:49 -0500 Subject: [PATCH 27/27] spelling: to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/authn/kubernetes/keychain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/authn/kubernetes/keychain.go b/pkg/authn/kubernetes/keychain.go index 368d829a2..396c84c48 100644 --- a/pkg/authn/kubernetes/keychain.go +++ b/pkg/authn/kubernetes/keychain.go @@ -214,7 +214,7 @@ func NewFromPullSecrets(ctx context.Context, secrets []corev1.Secret) (authn.Key } - // We reverse sort in to give more specific (aka longer) keys priority + // We reverse sort to give more specific (aka longer) keys priority // when matching for creds sort.Sort(sort.Reverse(sort.StringSlice(keyring.index))) }