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 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/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 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] 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 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. 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))) } 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{ 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/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/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). 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/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/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 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`. 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/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) 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) } } diff --git a/pkg/v1/remote/README.md b/pkg/v1/remote/README.md index c1e81b310..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. @@ -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). 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/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"), } { 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{ 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) } } 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", 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) 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 { 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, 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 { 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 { 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) 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. 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 { 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")