diff --git a/api/config/internal/context.go b/api/config/internal/context.go index de8c122835..6f1e6c58b5 100644 --- a/api/config/internal/context.go +++ b/api/config/internal/context.go @@ -79,7 +79,7 @@ type Context interface { ApplyConfigSet(name string) error // Reset all configs applied so far, subsequent calls to ApplyTo will - // ony see configs allpied after the last reset. + // only see configs applied after the last reset. Reset() int64 // Generation return the actual config generation. // this is a strictly increasing number, regardless of the number diff --git a/api/credentials/config/type.go b/api/credentials/config/type.go index 05f56f4ffd..27a06c03a6 100644 --- a/api/credentials/config/type.go +++ b/api/credentials/config/type.go @@ -23,10 +23,10 @@ func init() { // Config describes a configuration for the config context. type Config struct { runtime.ObjectVersionedType `json:",inline"` - // Consumers describe predefine logical cosumer specs mapped to credentials + // Consumers describe predefine logical consumer specs mapped to credentials // These will (potentially) be evaluated if access objects requiring credentials // are provided by other modules (e.g. oci repo access) without - // specifying crednentials. Then this module can request credentials here by passing + // specifying credentials. Then this module can request credentials here by passing // an appropriate consumer spec. Consumers []ConsumerSpec `json:"consumers,omitempty"` // Repositories describe preloaded credential repositories with potential credential chain diff --git a/api/credentials/extensions/repositories/memory/config/type.go b/api/credentials/extensions/repositories/memory/config/type.go index 95038eaa87..60befde5fd 100644 --- a/api/credentials/extensions/repositories/memory/config/type.go +++ b/api/credentials/extensions/repositories/memory/config/type.go @@ -31,7 +31,7 @@ type Config struct { type CredentialsSpec struct { CredentialsName string `json:"credentialsName"` - // Reference refers to credentials store in some othe repo + // Reference refers to credentials store in some other repo Reference *cpi.GenericCredentialsSpec `json:"reference,omitempty"` // Credentials are direct credentials (one of Reference or Credentials must be set) Credentials common.Properties `json:"credentials"` diff --git a/api/credentials/extensions/repositories/vault/repo_int_test.go b/api/credentials/extensions/repositories/vault/repo_int_test.go index 62bc34d9e2..a52e228a18 100644 --- a/api/credentials/extensions/repositories/vault/repo_int_test.go +++ b/api/credentials/extensions/repositories/vault/repo_int_test.go @@ -130,7 +130,7 @@ var _ = Describe("vault config", func() { Expect(err).To(BeNil()) }) - It("authenticate with approle with unsufficient authorizations and fail to retrieve credentials", func() { + It("authenticate with approle with insufficient authorizations and fail to retrieve credentials", func() { SetUpVaultAccess(ctx, DefaultContext, vaultClient, VAULT_INSUFFICIENT_POLICY_RULE) _ = Must(vaultClient.Secrets.KvV2Write(ctx, VAULT_PATH_REPO1+"/"+VAULT_SECRET, schema.KvV2WriteRequest{ @@ -169,7 +169,7 @@ var _ = Describe("vault config", func() { vault.WithMountPath("secret"), )) - // This is how we restrict the secrets accessible through the respository + // This is how we restrict the secrets accessible through the repository spec.Secrets = append(spec.Secrets, VAULT_SECRET) repo := Must(DefaultContext.RepositoryForSpec(spec, nil)) Expect(repo).ToNot(BeNil()) @@ -218,7 +218,7 @@ var _ = Describe("vault config", func() { vault.WithMountPath("secret"), )) - // This is how we restrict the secrets accessible through the respository + // This is how we restrict the secrets accessible through the repository spec.Secrets = append(spec.Secrets, VAULT_CUSTOM_SECRETS) repo := Must(DefaultContext.RepositoryForSpec(spec, nil)) Expect(repo).ToNot(BeNil()) diff --git a/api/credentials/internal/credentialsspec.go b/api/credentials/internal/credentialsspec.go index e0e97c39c9..b514599a3b 100644 --- a/api/credentials/internal/credentialsspec.go +++ b/api/credentials/internal/credentialsspec.go @@ -68,7 +68,7 @@ func (s *DefaultCredentialsSpec) UnmarshalJSON(data []byte) error { }{} err = json.Unmarshal(data, specdata) if err != nil { - return fmt.Errorf("failed ot unmarshal spec data: %w", err) + return fmt.Errorf("failed to unmarshal spec data: %w", err) } s.RepositorySpec = repo diff --git a/api/datacontext/action/handlers/registry.go b/api/datacontext/action/handlers/registry.go index 7751f1f19a..9d57a1a294 100644 --- a/api/datacontext/action/handlers/registry.go +++ b/api/datacontext/action/handlers/registry.go @@ -179,7 +179,7 @@ func (r *registry) Get(spec api.ActionSpec, possible ...string) []ActionHandlerM var result []ActionHandlerMatch if kinds := r.registrations[spec.GetKind()]; kinds != nil { - // first, check direct selctor match + // first, check direct selector match if reg := kinds[spec.Selector()]; reg != nil { if len(reg.versions) != 0 { if v := MatchVersion(r.types.SupportedActionVersions(spec.GetKind()), reg.versions); v != "" { diff --git a/api/datacontext/config/attrs/type.go b/api/datacontext/config/attrs/type.go index d6f8b841cc..ffdb70ccae 100644 --- a/api/datacontext/config/attrs/type.go +++ b/api/datacontext/config/attrs/type.go @@ -23,7 +23,7 @@ func init() { // Config describes a memory based repository interface. type Config struct { runtime.ObjectVersionedType `json:",inline"` - // Attributes descibe a set of geeric attribute settings + // Attributes describe a set of generic attribute settings Attributes map[string]json.RawMessage `json:"attributes,omitempty"` } diff --git a/api/datacontext/context.go b/api/datacontext/context.go index d883bec958..32414a07e3 100644 --- a/api/datacontext/context.go +++ b/api/datacontext/context.go @@ -155,7 +155,7 @@ type AttributesContext interface { BindTo(ctx context.Context) context.Context } -// AttributeFactory is used to atomicly create a new attribute for a context. +// AttributeFactory is used to atomically create a new attribute for a context. type AttributeFactory func(Context) interface{} type Attributes interface { diff --git a/api/helper/env/env.go b/api/helper/env/env.go index 6c186dbed6..b36bed6dfb 100644 --- a/api/helper/env/env.go +++ b/api/helper/env/env.go @@ -44,7 +44,7 @@ type Option interface { // This indirection (Option -> OptionHandler) is introduced // to enable objects to be usable as env option // (for example Environment) without the need to pollute its -// interface with the effective option methods defiuned by +// interface with the effective option methods defined by // OptionHandler. This would make no sense, because an option // typically does nothing but for a selected set of methods // according to its intended functionality. Nevertheless, @@ -55,7 +55,7 @@ type OptionHandler interface { GetFailHandler() FailHandler GetEnvironment() *Environment - // actions on environment ot properties + // actions on environment of properties // Mount mounts a new filesystem to the actual env filesystem. Mount(fs *composefs.ComposedFileSystem) error @@ -283,7 +283,7 @@ func (o tdOpt) OptionHandler() OptionHandler { func (o tdOpt) Mount(cfs *composefs.ComposedFileSystem) error { fs, err := projectionfs.New(osfs.New(), o.source) if err != nil { - return fmt.Errorf("faild to create new project fs: %w", err) + return fmt.Errorf("failed to create new project fs: %w", err) } if o.modifiable { @@ -297,7 +297,7 @@ func (o tdOpt) Mount(cfs *composefs.ComposedFileSystem) error { } if err := cfs.Mount(o.path, fs); err != nil { - return fmt.Errorf("faild to mount cfs: %w", err) + return fmt.Errorf("failed to mount cfs: %w", err) } return nil diff --git a/api/oci/extensions/repositories/ctf/synthesis_test.go b/api/oci/extensions/repositories/ctf/synthesis_test.go index 6b636c0048..539293a3b8 100644 --- a/api/oci/extensions/repositories/ctf/synthesis_test.go +++ b/api/oci/extensions/repositories/ctf/synthesis_test.go @@ -144,7 +144,7 @@ var _ = Describe("syntheses", func() { MustBeSuccessful(nested.Finalize()) Expect(vfs.Exists(info.FileSystem(), path)).To(BeFalse()) - // use syntesized blob to extract new blob, useless but should work + // use synthesized blob to extract new blob, useless but should work newblob := Must(artifactset.SynthesizeArtifactBlob(set, TAG)) finalize.Close(newblob, "newblob") diff --git a/api/ocm/compdesc/accessors.go b/api/ocm/compdesc/accessors.go index 56fdcb56a1..f8fe64ef14 100644 --- a/api/ocm/compdesc/accessors.go +++ b/api/ocm/compdesc/accessors.go @@ -70,7 +70,7 @@ type ArtifactAccessor interface { } // AccessSpec is an abstract specification of an access method -// The outbound object is typicall a runtime.UnstructuredTypedObject. +// The outbound object is typically a runtime.UnstructuredTypedObject. // Inbound any serializable AccessSpec implementation is possible. type AccessSpec = accessors.AccessSpec diff --git a/api/ocm/compdesc/componentdescriptor.go b/api/ocm/compdesc/componentdescriptor.go index 8638dfdb7c..13e73e4f40 100644 --- a/api/ocm/compdesc/componentdescriptor.go +++ b/api/ocm/compdesc/componentdescriptor.go @@ -153,7 +153,7 @@ type ElementMeta struct { // Version is the semver version of the object. Version string `json:"version"` // ExtraIdentity is the identity of an object. - // An additional label with key "name" ist not allowed + // An additional label with key "name" is not allowed ExtraIdentity metav1.Identity `json:"extraIdentity,omitempty"` // Labels defines an optional set of additional labels // describing the object. diff --git a/api/ocm/compdesc/copy_test.go b/api/ocm/compdesc/copy_test.go index f854d774f6..86c2deefef 100644 --- a/api/ocm/compdesc/copy_test.go +++ b/api/ocm/compdesc/copy_test.go @@ -14,7 +14,7 @@ import ( "ocm.software/ocm/api/utils/runtime" ) -var _ = Describe("Component Descripor Copy Test Suitet", func() { +var _ = Describe("Component Descriptor Copy Test Suitet", func() { Context("compdesc copy", func() { It("copies CD", func() { labels := v1.Labels{ diff --git a/api/ocm/compdesc/equal.go b/api/ocm/compdesc/equal.go index fd81d0c7da..4949991163 100644 --- a/api/ocm/compdesc/equal.go +++ b/api/ocm/compdesc/equal.go @@ -44,7 +44,7 @@ func (cd *ComponentDescriptor) Equivalent(o *ComponentDescriptor) equivalent.Equ func EquivalentElems(a ElementListAccessor, b ElementListAccessor) equivalent.EqualState { state := equivalent.StateEquivalent() - // Equivaluent of elements handles nil to provide state accoding to it + // Equivalent of elements handles nil to provide state according to it // relevance for the signature. for i := 0; i < a.Len(); i++ { ea := a.Get(i) diff --git a/api/ocm/compdesc/normalizations/legacy/legacy.go b/api/ocm/compdesc/normalizations/legacy/legacy.go index e05c982035..73e78bb2a7 100644 --- a/api/ocm/compdesc/normalizations/legacy/legacy.go +++ b/api/ocm/compdesc/normalizations/legacy/legacy.go @@ -15,7 +15,7 @@ var ( // DefaultingOfVersionIntoExtraIdentity normalizes the extra identity of the resources. // It sets the version of the resource, reference or source as extra identity field if the combination of name+extra identity -// is the same for multiple items. However, the last item in the list will not be updated as it is unique wihout this. +// is the same for multiple items. However, the last item in the list will not be updated as it is unique without this. // // TODO: To be removed once v1 + v2 are removed. // diff --git a/api/ocm/compdesc/versions/ocm.software/v3alpha1/componentdescriptor.go b/api/ocm/compdesc/versions/ocm.software/v3alpha1/componentdescriptor.go index c584fe5b74..8808fc3ec3 100644 --- a/api/ocm/compdesc/versions/ocm.software/v3alpha1/componentdescriptor.go +++ b/api/ocm/compdesc/versions/ocm.software/v3alpha1/componentdescriptor.go @@ -81,7 +81,7 @@ type ElementMeta struct { // Version is the semver version of the object. Version string `json:"version"` // ExtraIdentity is the identity of an object. - // An additional label with key "name" ist not allowed + // An additional label with key "name" is not allowed ExtraIdentity metav1.Identity `json:"extraIdentity,omitempty"` // Labels defines an optional set of additional labels // describing the object. diff --git a/api/ocm/compdesc/versions/ocm.software/v3alpha1/validation_test.go b/api/ocm/compdesc/versions/ocm.software/v3alpha1/validation_test.go index 6dfa915960..223ed5d258 100644 --- a/api/ocm/compdesc/versions/ocm.software/v3alpha1/validation_test.go +++ b/api/ocm/compdesc/versions/ocm.software/v3alpha1/validation_test.go @@ -373,7 +373,7 @@ var _ = Describe("Validation", func() { })))) }) - It("should pass if labels are defined multiple times in the same context with differnet names", func() { + It("should pass if labels are defined multiple times in the same context with different names", func() { comp.Spec.References = []Reference{ { ElementMeta: ElementMeta{ diff --git a/api/ocm/compdesc/versions/v2/componentdescriptor.go b/api/ocm/compdesc/versions/v2/componentdescriptor.go index c842619f63..d57f967148 100644 --- a/api/ocm/compdesc/versions/v2/componentdescriptor.go +++ b/api/ocm/compdesc/versions/v2/componentdescriptor.go @@ -126,7 +126,7 @@ type ElementMeta struct { // Version is the semver version of the object. Version string `json:"version"` // ExtraIdentity is the identity of an object. - // An additional label with key "name" ist not allowed + // An additional label with key "name" is not allowed ExtraIdentity metav1.Identity `json:"extraIdentity,omitempty"` // Labels defines an optional set of additional labels // describing the object. diff --git a/api/ocm/compdesc/versions/v2/validation_test.go b/api/ocm/compdesc/versions/v2/validation_test.go index 471a9b0b05..dd49fbe5cb 100644 --- a/api/ocm/compdesc/versions/v2/validation_test.go +++ b/api/ocm/compdesc/versions/v2/validation_test.go @@ -412,7 +412,7 @@ var _ = Describe("Validation", func() { })))) }) - It("should pass if labels are defined multiple times in the same context with differnet names", func() { + It("should pass if labels are defined multiple times in the same context with different names", func() { comp.ComponentReferences = []ComponentReference{ { ElementMeta: ElementMeta{ diff --git a/api/ocm/cpi/repocpi/view_cv.go b/api/ocm/cpi/repocpi/view_cv.go index 2c36d65db8..9c97f68099 100644 --- a/api/ocm/cpi/repocpi/view_cv.go +++ b/api/ocm/cpi/repocpi/view_cv.go @@ -79,7 +79,7 @@ type ComponentVersionAccessBridge interface { // and update mode state ShouldUpdate(final bool) bool - // GetBlobCache retieves the blob cache used to store preliminary + // GetBlobCache retrieves the blob cache used to store preliminary // blob accesses for freshly generated local access specs not directly // usable until a component version is finally added to the repository. GetBlobCache() BlobCache diff --git a/api/ocm/extensions/accessmethods/compose/method.go b/api/ocm/extensions/accessmethods/compose/method.go index 9228d2b1c0..503780e3fd 100644 --- a/api/ocm/extensions/accessmethods/compose/method.go +++ b/api/ocm/extensions/accessmethods/compose/method.go @@ -35,7 +35,7 @@ type AccessSpec struct { GlobalAccess *accspeccpi.AccessSpecRef `json:"globalAccess,omitempty"` // ReferenceName is an optional static name the object should be // use in a local repository context. It is use by a repository - // to optionally determine a globally referencable access according + // to optionally determine a globally referenceable access according // to the OCI distribution spec. The result will be stored // by the repository in the field ImageReference. // The value is typically an OCI repository name optionally diff --git a/api/ocm/extensions/accessmethods/github/method_test.go b/api/ocm/extensions/accessmethods/github/method_test.go index cec57bafee..1c77f2ce28 100644 --- a/api/ocm/extensions/accessmethods/github/method_test.go +++ b/api/ocm/extensions/accessmethods/github/method_test.go @@ -107,7 +107,7 @@ var _ = Describe("Method", func() { vfs.Cleanup(fs) }) - It("provides comsumer id", func() { + It("provides consumer id", func() { m, err := accessSpec.AccessMethod(&cpi.DummyComponentVersionAccess{Context: ctx}) Expect(err).ToNot(HaveOccurred()) Expect(credentials.GetProvidedConsumerId(m)).To(Equal(credentials.NewConsumerIdentity(identity.CONSUMER_TYPE, diff --git a/api/ocm/extensions/accessmethods/localblob/method.go b/api/ocm/extensions/accessmethods/localblob/method.go index 83fbcc4b05..297f9c949e 100644 --- a/api/ocm/extensions/accessmethods/localblob/method.go +++ b/api/ocm/extensions/accessmethods/localblob/method.go @@ -20,7 +20,7 @@ const ( // this package shows how to implement access types with multiple serialization versions. // So far, only one is implemented, but it shows how to add other ones. // -// Specifications using multiple format versions allways provide a single common +// Specifications using multiple format versions always provide a single common // *internal* Go representation, intended to be used by library users. Only this // internal version should be used outside this package. Additionally, there // are Go types representing the various format versions, which will be used @@ -91,7 +91,7 @@ type AccessSpec struct { GlobalAccess *accspeccpi.AccessSpecRef `json:"globalAccess,omitempty"` // ReferenceName is an optional static name the object should be // use in a local repository context. It is use by a repository - // to optionally determine a globally referencable access according + // to optionally determine a globally referenceable access according // to the OCI distribution spec. The result will be stored // by the repository in the field ImageReference. // The value is typically an OCI repository name optionally @@ -157,7 +157,7 @@ type AccessSpecV1 struct { GlobalAccess *accspeccpi.AccessSpecRef `json:"globalAccess,omitempty"` // ReferenceName is an optional static name the object should be // use in a local repository context. It is use by a repository - // to optionally determine a globally referencable access according + // to optionally determine a globally referenceable access according // to the OCI distribution spec. The result will be stored // by the repository in the field ImageReference. // The value is typically an OCI repository name optionally diff --git a/api/ocm/extensions/accessmethods/ocm/cli_test.go b/api/ocm/extensions/accessmethods/ocm/cli_test.go index bb92836ce8..1efe692f1f 100644 --- a/api/ocm/extensions/accessmethods/ocm/cli_test.go +++ b/api/ocm/extensions/accessmethods/ocm/cli_test.go @@ -26,8 +26,8 @@ var _ = Describe("OCM access CLI Test Environment", func() { Expect(h).NotTo(BeNil()) Expect(h.GetName()).To(Equal(ocm.Type)) - ot := h.OptionTypes() - Expect(len(ot)).To(Equal(4)) + optionTypes := h.OptionTypes() + Expect(len(optionTypes)).To(Equal(4)) opts := h.CreateOptions() Expect(sliceutils.Transform(opts.Options(), transformer.GetName[flagsets.Option, string])).To(ConsistOf( diff --git a/api/ocm/extensions/accessmethods/options/types.go b/api/ocm/extensions/accessmethods/options/types.go index f02ecd03f7..c7ef22fe4c 100644 --- a/api/ocm/extensions/accessmethods/options/types.go +++ b/api/ocm/extensions/accessmethods/options/types.go @@ -20,8 +20,8 @@ type option struct { } func (o *option) Equal(t flagsets.ConfigOptionType) bool { - if ot, ok := t.(*option); ok { - return o.valueType == ot.valueType && o.GetName() == ot.GetName() + if optionType, ok := t.(*option); ok { + return o.valueType == optionType.valueType && o.GetName() == optionType.GetName() } return false } diff --git a/api/ocm/extensions/accessmethods/plugin/cmd_test.go b/api/ocm/extensions/accessmethods/plugin/cmd_test.go index f7d588f12b..14e98d98c4 100644 --- a/api/ocm/extensions/accessmethods/plugin/cmd_test.go +++ b/api/ocm/extensions/accessmethods/plugin/cmd_test.go @@ -51,8 +51,8 @@ var _ = Describe("Add with new access method", func() { Expect(h).NotTo(BeNil()) Expect(h.GetName()).To(Equal("test")) - ot := h.OptionTypes() - Expect(len(ot)).To(Equal(2)) + optionTypes := h.OptionTypes() + Expect(len(optionTypes)).To(Equal(2)) opts := h.CreateOptions() Expect(sliceutils.Transform(opts.Options(), transformer.GetName[flagsets.Option, string])).To(ConsistOf( diff --git a/api/ocm/extensions/accessmethods/s3/method_test.go b/api/ocm/extensions/accessmethods/s3/method_test.go index d8bd556aa9..a930608941 100644 --- a/api/ocm/extensions/accessmethods/s3/method_test.go +++ b/api/ocm/extensions/accessmethods/s3/method_test.go @@ -150,7 +150,7 @@ var _ = Describe("Method", func() { vfs.Cleanup(fs) }) - It("provides comsumer id", func() { + It("provides consumer id", func() { m, err := accessSpec.AccessMethod(&cpi.DummyComponentVersionAccess{Context: env.OCMContext()}) Expect(err).ToNot(HaveOccurred()) Expect(credentials.GetProvidedConsumerId(m)).To(Equal(credentials.NewConsumerIdentity(identity.CONSUMER_TYPE, diff --git a/api/ocm/extensions/blobhandler/doc.go b/api/ocm/extensions/blobhandler/doc.go index d9d0cdec29..b0c552f62f 100644 --- a/api/ocm/extensions/blobhandler/doc.go +++ b/api/ocm/extensions/blobhandler/doc.go @@ -4,5 +4,5 @@ // implementations of the oci go binding interface // In those sub packages there a handler packages for dedicated repository // implementations for this type, for example the oci registry implementation -// for the contect type oci. +// for the connect type oci. package blobhandler diff --git a/api/ocm/extensions/blobhandler/handlers/generic/maven/blobhandler_test.go b/api/ocm/extensions/blobhandler/handlers/generic/maven/blobhandler_test.go index c6147027c2..837d814aae 100644 --- a/api/ocm/extensions/blobhandler/handlers/generic/maven/blobhandler_test.go +++ b/api/ocm/extensions/blobhandler/handlers/generic/maven/blobhandler_test.go @@ -41,7 +41,7 @@ var _ = Describe("blobhandler generic maven tests", func() { "path" : "/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar", "created" : "2024-04-11T15:09:28.920Z", "createdBy" : "john.doe", - "downloadUri" : "https://ocm.sofware/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar", + "downloadUri" : "https://ocm.software/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar", "mimeType" : "application/java-archive", "size" : "1792", "checksums" : { @@ -50,13 +50,13 @@ var _ = Describe("blobhandler generic maven tests", func() { "sha256" : "b19dcd275f72a0cbdead1e5abacb0ef25a0cb55ff36252ef44b1178eeedf9c30" }, "originalChecksums" : { "sha256" : "b19dcd275f72a0cbdead1e5abacb0ef25a0cb55ff36252ef44b1178eeedf9c30" }, - "uri" : "https://ocm.sofware/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar" }` + "uri" : "https://ocm.software/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar" }` var body maven.Body err := json.Unmarshal([]byte(resp), &body) Expect(err).To(BeNil()) Expect(body.Repo).To(Equal("ocm-mvn-test")) - Expect(body.DownloadUri).To(Equal("https://ocm.sofware/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar")) - Expect(body.Uri).To(Equal("https://ocm.sofware/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar")) + Expect(body.DownloadUri).To(Equal("https://ocm.software/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar")) + Expect(body.Uri).To(Equal("https://ocm.software/repository/ocm-mvn-test/open-component-model/hello-ocm/0.0.2/hello-ocm-0.0.2.jar")) Expect(body.MimeType).To(Equal("application/java-archive")) Expect(body.Size).To(Equal("1792")) Expect(body.Checksums["md5"]).To(Equal("6cb7520b65d820b3b35773a8daa8368e")) diff --git a/api/ocm/extensions/download/doc.go b/api/ocm/extensions/download/doc.go index 78ed9c7633..29c04bc079 100644 --- a/api/ocm/extensions/download/doc.go +++ b/api/ocm/extensions/download/doc.go @@ -1,5 +1,5 @@ // Package download provides an API for resource download handlers. -// A download handler is used for downloading resoures. By default, the native +// A download handler is used for downloading resources. By default, the native // blob as provided by the access method is the result of a download. // A download handler can influence the outbound blob format according // to the concrete type of the resource. diff --git a/api/ocm/extensions/download/handlers/plugin/handler.go b/api/ocm/extensions/download/handlers/plugin/handler.go index 5d568aa15c..0b08654539 100644 --- a/api/ocm/extensions/download/handlers/plugin/handler.go +++ b/api/ocm/extensions/download/handlers/plugin/handler.go @@ -43,7 +43,7 @@ func (b *pluginHandler) Download(_ common.Printer, racc cpi.ResourceAccess, path finalize.Close(m, "method for download") r := accessio.NewOndemandReader(m) - finalize.Close(r, "reader for downlowd download") + finalize.Close(r, "reader for download") return b.plugin.Download(b.name, r, racc.Meta().Type, m.MimeType(), path, b.config) } diff --git a/api/ocm/extensions/repositories/ctf/repo_test.go b/api/ocm/extensions/repositories/ctf/repo_test.go index 1687970b93..31544309e2 100644 --- a/api/ocm/extensions/repositories/ctf/repo_test.go +++ b/api/ocm/extensions/repositories/ctf/repo_test.go @@ -158,7 +158,7 @@ var _ = Describe("access method", func() { Expect(err).To(MatchError(ContainSubstring("component version \"github.com/mandelsoft/ocm:1.0.0\" not found: oci artifact \"1.0.0\" not found in component-descriptors/github.com/mandelsoft/ocm"))) }) - It("provides error for invalid bloc access", func() { + It("provides error for invalid blob access", func() { final := Finalizer{} defer Defer(final.Finalize) diff --git a/api/ocm/extensions/repositories/genericocireg/componentversion.go b/api/ocm/extensions/repositories/genericocireg/componentversion.go index d332ca2527..e0dd0f5470 100644 --- a/api/ocm/extensions/repositories/genericocireg/componentversion.go +++ b/api/ocm/extensions/repositories/genericocireg/componentversion.go @@ -37,7 +37,7 @@ import ( "ocm.software/ocm/api/version" ) -// newComponentVersionAccess creates a component access for the artifact access, if this fails the artifact acess is closed. +// newComponentVersionAccess creates a component access for the artifact access, if this fails the artifact access is closed. func newComponentVersionAccess(mode accessobj.AccessMode, comp *componentAccessImpl, version string, access oci.ArtifactAccess, persistent bool) (*repocpi.ComponentVersionAccessInfo, error) { c, err := newComponentVersionContainer(mode, comp, version, access) if err != nil { diff --git a/api/ocm/extensions/repositories/genericocireg/state.go b/api/ocm/extensions/repositories/genericocireg/state.go index bafcae058c..834a768016 100644 --- a/api/ocm/extensions/repositories/genericocireg/state.go +++ b/api/ocm/extensions/repositories/genericocireg/state.go @@ -127,10 +127,10 @@ func (s *StateAccess) readComponentDescriptorFromTar(r io.Reader) ([]byte, error // archive can be an image layer and that can even reach the gigabyte range. // For now, we acknowledge the risk. // - // We checked other softwares and tried to figure out how they manage this, + // We checked other software and tried to figure out how they manage this, // but it's handled the same way. if _, err := io.Copy(&data, tr); err != nil { - return nil, fmt.Errorf("erro while reading component descriptor file from tar: %w", err) + return nil, fmt.Errorf("error while reading component descriptor file from tar: %w", err) } return data.Bytes(), err } diff --git a/api/ocm/extensions/repositories/virtual/componentversion.go b/api/ocm/extensions/repositories/virtual/componentversion.go index 3bd60b61e4..d50c51c771 100644 --- a/api/ocm/extensions/repositories/virtual/componentversion.go +++ b/api/ocm/extensions/repositories/virtual/componentversion.go @@ -15,7 +15,7 @@ import ( "ocm.software/ocm/api/utils/refmgmt" ) -// newComponentVersionAccess creates a component access for the artifact access, if this fails the artifact acess is closed. +// newComponentVersionAccess creates a component access for the artifact access, if this fails the artifact access is closed. func newComponentVersionAccess(comp *componentAccessImpl, version string, persistent bool) (*repocpi.ComponentVersionAccessInfo, error) { access, err := comp.repo.access.GetComponentVersion(comp.GetName(), version) if err != nil { diff --git a/api/ocm/internal/blobhandler.go b/api/ocm/internal/blobhandler.go index 5817e14768..06b81c0619 100644 --- a/api/ocm/internal/blobhandler.go +++ b/api/ocm/internal/blobhandler.go @@ -231,7 +231,7 @@ type BlobHandlerRegistry interface { IsInitial() bool - // Copy provides a new independend copy of the registry. + // Copy provides a new independent copy of the registry. Copy() BlobHandlerRegistry // RegisterBlobHandler registers a blob handler. It must specify either a sole mime type, // or a context and repository type, or all three keys. diff --git a/api/ocm/internal/blobhandler_test.go b/api/ocm/internal/blobhandler_test.go index 30dd26df8d..504231a661 100644 --- a/api/ocm/internal/blobhandler_test.go +++ b/api/ocm/internal/blobhandler_test.go @@ -153,7 +153,7 @@ var _ = Describe("blob handler registry test", func() { ext = internal.NewBlobHandlerRegistry(reg) }) - DescribeTable("priortizes complete specs", + DescribeTable("prioritizes complete specs", func(eff *internal.BlobHandlerRegistry) { reg.Register(&BlobHandler{"mine"}, internal.ForMimeType(mime.MIME_TEXT)) reg.Register(&BlobHandler{"repo"}, internal.ForRepo(internal.CONTEXT_TYPE, REPO)) @@ -170,7 +170,7 @@ var _ = Describe("blob handler registry test", func() { Entry("extended", &ext), ) - DescribeTable("priortizes mime", + DescribeTable("prioritizes mime", func(eff *internal.BlobHandlerRegistry) { reg.Register(&BlobHandler{"mine"}, internal.ForMimeType(mime.MIME_TEXT)) reg.Register(&BlobHandler{"repo"}, internal.ForRepo(internal.CONTEXT_TYPE, REPO)) @@ -185,7 +185,7 @@ var _ = Describe("blob handler registry test", func() { Entry("extended", &ext), ) - DescribeTable("priortizes mime", + DescribeTable("prioritizes mime", func(eff *internal.BlobHandlerRegistry) { reg.Register(&BlobHandler{"mine"}, internal.ForMimeType(mime.MIME_TEXT)) reg.Register(&BlobHandler{"repo"}, internal.ForRepo(internal.CONTEXT_TYPE, REPO)) @@ -201,7 +201,7 @@ var _ = Describe("blob handler registry test", func() { Entry("extended", &ext), ) - DescribeTable("priortizes prio", + DescribeTable("prioritizes prio", func(eff *internal.BlobHandlerRegistry) { reg.Register(&BlobHandler{"mine"}, internal.ForMimeType(mime.MIME_TEXT)) reg.Register(&BlobHandler{"repo"}, internal.ForRepo(internal.CONTEXT_TYPE, REPO)) diff --git a/api/ocm/internal/repotypes.go b/api/ocm/internal/repotypes.go index faff1e8cd4..0d44985275 100644 --- a/api/ocm/internal/repotypes.go +++ b/api/ocm/internal/repotypes.go @@ -29,7 +29,7 @@ type RepositorySpec interface { // AsUniformSpec transforms the specification object // into a uniform repository spec as provided by // the string based parsing for repository/component/version - // notations. The provided spec MUST be convertable again + // notations. The provided spec MUST be convertible again // into a repository spec with the same meaning // by registering an appropriate RepositorySpecHandler. AsUniformSpec(Context) *UniformRepositorySpec diff --git a/api/ocm/ocmutils/check/check_test.go b/api/ocm/ocmutils/check/check_test.go index 2a9a6c9ca2..0e90e144bd 100644 --- a/api/ocm/ocmutils/check/check_test.go +++ b/api/ocm/ocmutils/check/check_test.go @@ -38,7 +38,7 @@ var _ = Describe("Test Environment", func() { env.Cleanup() }) - It("get checks refereces", func() { + It("get checks references", func() { env.OCMCommonTransport(ARCH, accessio.FormatDirectory, func() { env.ComponentVersion(COMP, VERSION, func() { env.Reference("ref", COMP3, VERSION) diff --git a/api/ocm/plugin/cache/updater.go b/api/ocm/plugin/cache/updater.go index 22441765b7..af7c7d963d 100644 --- a/api/ocm/plugin/cache/updater.go +++ b/api/ocm/plugin/cache/updater.go @@ -169,7 +169,7 @@ func (o *PluginUpdater) DownloadRef(session ocm.Session, ref string, name string return o.downloadLatest(session, result.Component, name) } if result.Version.GetVersion() == o.Current && !o.Force { - o.Printer.Printf("plugin %s already uptodate\n", name) + o.Printer.Printf("plugin %s already up-to-date\n", name) return nil } return o.download(session, result.Version, name) @@ -188,7 +188,7 @@ func (o *PluginUpdater) DownloadFromRepo(session ocm.Session, repo ocm.Repositor } if cr.IsVersion() { if *cr.Version == o.Current && !o.Force { - o.Printer.Printf("plugin %s already uptodate\n", name) + o.Printer.Printf("plugin %s already up-to-date\n", name) return nil } cv, err = session.GetComponentVersion(comp, *cr.Version) @@ -222,7 +222,7 @@ func (o *PluginUpdater) downloadLatest(session ocm.Session, comp ocm.ComponentAc versions = versions[len(versions)-1:] } if versions[0].Original() == o.Current && !o.Force { - o.Printer.Printf("plugin %s already uptodate\n", name) + o.Printer.Printf("plugin %s already up-to-date\n", name) return nil } cv, err := session.GetComponentVersion(comp, versions[0].Original()) diff --git a/api/ocm/plugin/common/describe.go b/api/ocm/plugin/common/describe.go index fa6c0e3165..01c082d496 100644 --- a/api/ocm/plugin/common/describe.go +++ b/api/ocm/plugin/common/describe.go @@ -548,7 +548,7 @@ func ListElements[E DescribableElement[C], C Describable](msg string, elems []E, out.Printf("%s\n", desc) } if len(m.GetConstraints()) > 0 { - out.Printf("Registration Contraints:\n") + out.Printf("Registration Constraints:\n") for _, c := range m.GetConstraints() { out.Printf("- %s\n", utils.IndentLines(c.Describe(), " ", true)) } diff --git a/api/ocm/plugin/plugin.go b/api/ocm/plugin/plugin.go index 5d4cb2524c..a85622a69d 100644 --- a/api/ocm/plugin/plugin.go +++ b/api/ocm/plugin/plugin.go @@ -104,12 +104,12 @@ func (p *pluginImpl) Exec(r io.Reader, w io.Writer, args ...string) (result []by lcfg := &logging.LoggingConfiguration{} _, err = p.Context().ConfigContext().ApplyTo(0, lcfg) if err != nil { - return nil, errors.Wrapf(err, "cannot extract plugin logging configration") + return nil, errors.Wrapf(err, "cannot extract plugin logging configuration") } lcfg.LogFileName = logfile.Name() data, err := json.Marshal(lcfg) if err != nil { - return nil, errors.Wrapf(err, "cannot marshal plugin logging configration") + return nil, errors.Wrapf(err, "cannot marshal plugin logging configuration") } args = append([]string{"--" + ppi.OptPlugingLogConfig, string(data)}, args...) } diff --git a/api/ocm/plugin/ppi/cmds/logging.go b/api/ocm/plugin/ppi/cmds/logging.go index 60fba4f22a..fa82dbb7ba 100644 --- a/api/ocm/plugin/ppi/cmds/logging.go +++ b/api/ocm/plugin/ppi/cmds/logging.go @@ -11,7 +11,7 @@ type LoggingHandler interface { var handler LoggingHandler // RegisterLoggingConfigHandler is used to register a configuration handler -// for logging configration passed by the OCM library. +// for logging configuration passed by the OCM library. // If standard mandelsoft logging is used, it can be adapted // by adding the ananymous import of the ppi/logging package. func RegisterLoggingConfigHandler(h LoggingHandler) { diff --git a/api/ocm/plugin/ppi/interface.go b/api/ocm/plugin/ppi/interface.go index 27f9048ee5..4164f42d4b 100644 --- a/api/ocm/plugin/ppi/interface.go +++ b/api/ocm/plugin/ppi/interface.go @@ -91,7 +91,7 @@ type AccessMethod interface { // specification. Options() []options.OptionType - // Description provides a general description for the access mehod kind. + // Description provides a general description for the access method kind. Description() string // Format describes the attributes of the dedicated version. Format() string @@ -176,7 +176,7 @@ type ValueSet interface { // specification. Options() []options.OptionType - // Description provides a general description for the access mehod kind. + // Description provides a general description for the access method kind. Description() string // Format describes the attributes of the dedicated version. Format() string diff --git a/api/ocm/plugin/ppi/plugin.go b/api/ocm/plugin/ppi/plugin.go index 319a2891ea..eb8401fefa 100644 --- a/api/ocm/plugin/ppi/plugin.go +++ b/api/ocm/plugin/ppi/plugin.go @@ -547,7 +547,7 @@ func (p *plugin) RegisterCommand(c Command) error { } cmd := c.Command() if cmd.HasSubCommands() && c.Verb() != "" { - return errors.Newf("no sub commands allowd for CLI command for verb") + return errors.Newf("no sub commands allowed for CLI command for verb") } objtype := c.ObjectType() diff --git a/api/ocm/tools/signing/handle.go b/api/ocm/tools/signing/handle.go index 0ef1a649ce..61de293aef 100644 --- a/api/ocm/tools/signing/handle.go +++ b/api/ocm/tools/signing/handle.go @@ -714,7 +714,7 @@ func NormalizedDigesterType(digest *metav1.DigestSpec) ocm.DigesterType { return dc } -// GetDigestMode checks whether the versio has already been digested. +// GetDigestMode checks whether the version has already been digested. // If so, the digest mode used at this time fixes the mode for all further // signing processes. // If a version is still undigested, any mode possible and is optionally diff --git a/api/ocm/tools/signing/signing_test.go b/api/ocm/tools/signing/signing_test.go index a54e91c9bb..a1f9b74f91 100644 --- a/api/ocm/tools/signing/signing_test.go +++ b/api/ocm/tools/signing/signing_test.go @@ -1250,7 +1250,7 @@ applying to version "github.com/mandelsoft/test:v1"[github.com/mandelsoft/test:v }) }) - It("rembers all indirectly signed component descriptors", func() { + It("remembers all indirectly signed component descriptors", func() { src := Must(ctf.Open(env.OCMContext(), accessobj.ACC_WRITABLE, ARCH, 0, env)) defer Close(src, "ctf") diff --git a/api/ocm/tools/transfer/options.go b/api/ocm/tools/transfer/options.go index 4c9e66dcf2..74675d4793 100644 --- a/api/ocm/tools/transfer/options.go +++ b/api/ocm/tools/transfer/options.go @@ -24,7 +24,7 @@ type ( // - package transferhandler.standard: able to select recursive transfer // general value artifact transport. // - package transferhandler.spiff: controls transfer using a spiff script. - // Custom implemetations can be used to gain fine-grained control + // Custom implementations can be used to gain fine-grained control // over the transfer process, whose general flow is handled by // a uniform Transfer function. TransferHandler = transferhandler.TransferHandler diff --git a/api/ocm/tools/transfer/transfer.go b/api/ocm/tools/transfer/transfer.go index ad6121728e..0e5c9b33c9 100644 --- a/api/ocm/tools/transfer/transfer.go +++ b/api/ocm/tools/transfer/transfer.go @@ -310,7 +310,7 @@ func copyVersion(printer common.Printer, log logging.Logger, hist common.History } } if ok { - // sources do not have digests fo far, so they have to copied, always. + // sources do not have digests so far, so they have to copied, always. hint := ocmcpi.ArtifactNameHint(a, src) notifyArtifactInfo(printer, log, "source", i, r.Meta(), hint) err = errors.Join(err, handler.HandleTransferSource(r, m, hint, t)) diff --git a/api/ocm/tools/transfer/transferhandler/transferhandler.go b/api/ocm/tools/transfer/transferhandler/transferhandler.go index 260d3f9216..f769a90db4 100644 --- a/api/ocm/tools/transfer/transferhandler/transferhandler.go +++ b/api/ocm/tools/transfer/transferhandler/transferhandler.go @@ -36,8 +36,8 @@ type TransferOptions interface{} // TransferOptionsCreator is an optional interface for a TransferOption. // The option may provide a default TransferOptions object if it applies -// to regular transfer handler options. THis is used to infer an applicable -// transfer hander for the gicven option set. +// to regular transfer handler options. This is used to infer an applicable +// transferhandler for the given option set. // Options not intended for the transfer handler MUST NOT implement this // interface to not hamper the handler detection process. type TransferOptionsCreator interface { diff --git a/api/ocm/valuemergehandler/handlers/maplistmerge/handler.go b/api/ocm/valuemergehandler/handlers/maplistmerge/handler.go index f2d292d3d3..9cd9543a2f 100644 --- a/api/ocm/valuemergehandler/handlers/maplistmerge/handler.go +++ b/api/ocm/valuemergehandler/handlers/maplistmerge/handler.go @@ -57,19 +57,19 @@ func merge(ctx cpi.Context, c *Config, lv Value, tv *Value) (bool, error) { key := le[c.KeyField] if key != nil { found := -1 - for i, te := range *tv { - if te[c.KeyField] == key { + for i, entry := range *tv { + if entry[c.KeyField] == key { found = i - if !reflect.DeepEqual(le, te) { + if !reflect.DeepEqual(le, entry) { switch c.Overwrite { case MODE_DEFAULT: if c.Entries != nil { - subm, te, err = hpi.GenericMerge(ctx, c.Entries, "", le, te) + subm, entry, err = hpi.GenericMerge(ctx, c.Entries, "", le, entry) if err != nil { return false, errors.Wrapf(err, "entry identity %q", key) } if subm { - (*tv)[i] = te + (*tv)[i] = entry modified = true } break diff --git a/api/ocm/valuemergehandler/handlers/simplelistmerge/handler.go b/api/ocm/valuemergehandler/handlers/simplelistmerge/handler.go index 65df12c306..397bf4c534 100644 --- a/api/ocm/valuemergehandler/handlers/simplelistmerge/handler.go +++ b/api/ocm/valuemergehandler/handlers/simplelistmerge/handler.go @@ -34,8 +34,8 @@ func merge(ctx hpi.Context, c *Config, lv Value, tv *Value) (bool, error) { modified := false outer: for _, le := range lv { - for _, te := range *tv { - if equal(c, le, te) { + for _, entry := range *tv { + if equal(c, le, entry) { continue outer } } @@ -45,13 +45,13 @@ outer: return modified, nil } -func equal(c *Config, le, te Entry) bool { +func equal(c *Config, le, entry Entry) bool { if c == nil || len(c.IgnoredFields) == 0 { - return reflect.DeepEqual(le, te) + return reflect.DeepEqual(le, entry) } if lm, ok := le.(map[string]interface{}); ok { - if tm, ok := te.(map[string]interface{}); ok { + if tm, ok := entry.(map[string]interface{}); ok { for _, n := range c.IgnoredFields { delete(lm, n) delete(tm, n) @@ -59,5 +59,5 @@ func equal(c *Config, le, te Entry) bool { return reflect.DeepEqual(lm, tm) } } - return reflect.DeepEqual(le, te) + return reflect.DeepEqual(le, entry) } diff --git a/api/ocm/valuemergehandler/handlers/simplemapmerge/handler.go b/api/ocm/valuemergehandler/handlers/simplemapmerge/handler.go index aea03d6d71..8d1a4fd821 100644 --- a/api/ocm/valuemergehandler/handlers/simplemapmerge/handler.go +++ b/api/ocm/valuemergehandler/handlers/simplemapmerge/handler.go @@ -47,18 +47,18 @@ func merge(ctx hpi.Context, c *Config, lv Value, tv *Value) (bool, error) { subm := false modified := false for lk, le := range lv { - if te, ok := (*tv)[lk]; ok { - if !reflect.DeepEqual(le, te) { + if entry, ok := (*tv)[lk]; ok { + if !reflect.DeepEqual(le, entry) { switch c.Overwrite { case MODE_DEFAULT: if c.Entries != nil { hpi.Log.Trace("different entry found in target -> merge it", "name", lk, "entries", c.Entries) - subm, te, err = hpi.GenericMerge(ctx, c.Entries, "", le, te) + subm, entry, err = hpi.GenericMerge(ctx, c.Entries, "", le, entry) if err != nil { return false, errors.Wrapf(err, "map key %q", lk) } if subm { - (*tv)[lk] = te + (*tv)[lk] = entry modified = true hpi.Log.Trace("entry merge result", "result", (*tv)) } else { diff --git a/api/ocm/valuemergehandler/hpi/logging.go b/api/ocm/valuemergehandler/hpi/logging.go index 72c60ae5c5..a2cef96c93 100644 --- a/api/ocm/valuemergehandler/hpi/logging.go +++ b/api/ocm/valuemergehandler/hpi/logging.go @@ -4,6 +4,6 @@ import ( ocmlog "ocm.software/ocm/api/utils/logging" ) -var REALM = ocmlog.DefineSubRealm("value marge handling", "valuemerge") +var REALM = ocmlog.DefineSubRealm("value merge handling", "valuemerge") var Log = ocmlog.DynamicLogger(REALM) diff --git a/api/tech/oras/interface.go b/api/tech/oras/interface.go index 5020f68d21..e5872ae8b0 100644 --- a/api/tech/oras/interface.go +++ b/api/tech/oras/interface.go @@ -22,7 +22,7 @@ type Resolver interface { // reference a specific host or be matched against a specific handler. // // The returned name should be used to identify the referenced entity. - // Dependending on the remote namespace, this may be immutable or mutable. + // Depending on the remote namespace, this may be immutable or mutable. // While the name may differ from ref, it should itself be a valid ref. // // If the resolution fails, an error will be returned. diff --git a/api/tech/signing/handlers/sigstore/attr/attr.go b/api/tech/signing/handlers/sigstore/attr/attr.go index a8cbb71d50..9608541dfd 100644 --- a/api/tech/signing/handlers/sigstore/attr/attr.go +++ b/api/tech/signing/handlers/sigstore/attr/attr.go @@ -76,7 +76,7 @@ func (a AttributeType) Decode(data []byte, unmarshaler runtime.Unmarshaler) (int attr := &Attribute{} err := unmarshaler.Unmarshal(data, attr) if err != nil { - return nil, fmt.Errorf("invalud attribute value for %s: %w", ATTR_KEY, err) + return nil, fmt.Errorf("invalid attribute value for %s: %w", ATTR_KEY, err) } return attr, nil diff --git a/api/tech/signing/handlers/sigstore/handler.go b/api/tech/signing/handlers/sigstore/handler.go index 15f7b42bd6..72f33af983 100644 --- a/api/tech/signing/handlers/sigstore/handler.go +++ b/api/tech/signing/handlers/sigstore/handler.go @@ -110,7 +110,7 @@ func (h Handler) Sign(cctx credentials.Context, digest string, sctx signing.Sign // verify the signed certificate timestamp if err := cosign.VerifySCT(ctx, fs.Cert, fs.Chain, fs.SCT, pubKeys); err != nil { - return nil, fmt.Errorf("failed to verify signed certifcate timestamp: %w", err) + return nil, fmt.Errorf("failed to verify signed certificate timestamp: %w", err) } // get the public key from the signing key pair @@ -140,7 +140,7 @@ func (h Handler) Sign(cctx credentials.Context, digest string, sctx signing.Sign // create a rekor hashed entry hashedEntry := prepareRekorEntry(digest, sig, publicKey) - // valiate the rekor entry before submission + // validate the rekor entry before submission if _, err := hashedEntry.Canonicalize(ctx); err != nil { return nil, fmt.Errorf("rekor entry is not valid: %w", err) } diff --git a/api/tech/signing/rules.go b/api/tech/signing/rules.go index e1728f1db2..9e6de65d32 100644 --- a/api/tech/signing/rules.go +++ b/api/tech/signing/rules.go @@ -143,7 +143,7 @@ func (r MapIncludes) Field(name string, value interface{}) (string, interface{}, } func (r MapIncludes) Element(v interface{}) (bool, interface{}, ExcludeRules) { - panic("invalid exclude structure, require arry but found struct rules") + panic("invalid exclude structure, require array but found struct rules") } //////////////////////////////////////////////////////////////////////////////// @@ -327,7 +327,7 @@ func (r DynamicMapIncludes) Field(name string, value interface{}) (string, inter } func (r DynamicMapIncludes) Element(value interface{}) (bool, interface{}, ExcludeRules) { - panic("invalid exclude structure, require arry but found struct rules") + panic("invalid exclude structure, require array but found struct rules") } //////////////////////////////////////////////////////////////////////////////// @@ -368,7 +368,7 @@ func (r DynamicMapExcludes) Field(name string, value interface{}) (string, inter } func (r DynamicMapExcludes) Element(value interface{}) (bool, interface{}, ExcludeRules) { - panic("invalid exclude structure, require arry but found struct rules") + panic("invalid exclude structure, require array but found struct rules") } //////////////////////////////////////////////////////////////////////////////// @@ -414,7 +414,7 @@ func (r ConditionalMapExcludes) Field(name string, value interface{}) (string, i } func (r ConditionalMapExcludes) Element(value interface{}) (bool, interface{}, ExcludeRules) { - panic("invalid exclude structure, require arry but found struct rules") + panic("invalid exclude structure, require array but found struct rules") } //////////////////////////////////////////////////////////////////////////////// diff --git a/api/utils/accessobj/accessstate.go b/api/utils/accessobj/accessstate.go index a53e494305..9e3479ef69 100644 --- a/api/utils/accessobj/accessstate.go +++ b/api/utils/accessobj/accessstate.go @@ -130,7 +130,7 @@ var _ State = (*state)(nil) // and the management of its technical representation as byte array. func NewState(mode AccessMode, a StateAccess, p StateHandler) (State, error) { state, err := newState(mode, a, p) - // avoid nil pinter problem: go is great + // avoid nil pointer problem: go is great if err != nil { return nil, err } diff --git a/api/utils/blobaccess/blobaccess/other.go b/api/utils/blobaccess/blobaccess/other.go index 3e35ef143f..c43ae7dc03 100644 --- a/api/utils/blobaccess/blobaccess/other.go +++ b/api/utils/blobaccess/blobaccess/other.go @@ -27,16 +27,16 @@ func (b *blobprovider) Close() error { return b.blob.Close() } -// ProviderForBlobAccess provides subsequent bloc accesses +// ProviderForBlobAccess provides subsequent blob accesses // as long as the given blob access is not closed. // If required the blob can be closed with the additionally // provided Close method. -// ATTENTION: the underlying BlobAccess wil not be closed +// ATTENTION: the underlying BlobAccess will not be closed // as long as the provider is not closed, but the BlobProvider // interface is no io.Closer. // To be on the safe side, this method should only be called // with static blob access, featuring a NOP closer without -// anny attached external resources, which should be released. +// any attached external resources, which should be released. func ProviderForBlobAccess(blob bpi.BlobAccess) *blobprovider { return &blobprovider{blob} } diff --git a/api/utils/blobaccess/dockermulti/access.go b/api/utils/blobaccess/dockermulti/access.go index 600e24ada1..e3213350e7 100644 --- a/api/utils/blobaccess/dockermulti/access.go +++ b/api/utils/blobaccess/dockermulti/access.go @@ -68,7 +68,7 @@ func BlobAccess(opts ...Option) (bpi.BlobAccess, error) { index.SetAnnotation(annotations.COMPVERS_ANNOTATION, eff.Origin.String()) } if version == "" { - return nil, fmt.Errorf("no versio specified") + return nil, fmt.Errorf("no version specified") } feedback := func(blob bpi.BlobAccess, art cpi.ArtifactAccess) error { diff --git a/api/utils/logging/logging.go b/api/utils/logging/logging.go index c88a1c4d02..04a54e69a1 100644 --- a/api/utils/logging/logging.go +++ b/api/utils/logging/logging.go @@ -72,7 +72,7 @@ var logContext = ocm // SetContext sets a new preconfigured context. // This function should be called prior to any configuration -// to avoid loosing them. +// to avoid losing them. func SetContext(ctx logging.Context) { logContext = NewContext(ctx) } diff --git a/api/utils/misc/printer_test.go b/api/utils/misc/printer_test.go index ea270dcfd2..15594403cd 100644 --- a/api/utils/misc/printer_test.go +++ b/api/utils/misc/printer_test.go @@ -51,7 +51,7 @@ var _ = Describe("Printer", func() { Expect(AssurePrinter(p)).To(BeIdenticalTo(p)) }) - Context("loggging", func() { + Context("logging", func() { var buf *bytes.Buffer var logctx logging.Context var printer Printer diff --git a/api/utils/panics/panics_test.go b/api/utils/panics/panics_test.go index 7844a39b1e..206982f902 100644 --- a/api/utils/panics/panics_test.go +++ b/api/utils/panics/panics_test.go @@ -24,7 +24,7 @@ func callee(topanic interface{}) { } var _ = Describe("catch panics", func() { - It("propagates catched panic", func() { + It("propagates caught panic", func() { defer func() { Expect(recover()).To(BeNil()) }() @@ -35,7 +35,7 @@ goroutine [0-9]* \[running\]: panic.*$`)) }) - It("propagates catched panic with handlers", func() { + It("propagates caught panic with handlers", func() { defer func() { Expect(recover()).To(BeNil()) }() diff --git a/api/utils/refmgmt/refcloser.go b/api/utils/refmgmt/refcloser.go index 75581ea403..c66bb65649 100644 --- a/api/utils/refmgmt/refcloser.go +++ b/api/utils/refmgmt/refcloser.go @@ -10,7 +10,7 @@ import ( var ErrClosed = errors.ErrClosed() -// ReferencableCloser manages closable views to a basic closer. +// ReferenceableCloser manages closable views to a basic closer. // If the last view is closed, the basic closer is finally closed. type ReferencableCloser interface { ExtendedAllocatable diff --git a/api/utils/refmgmt/resource/suite_test.go b/api/utils/refmgmt/resource/suite_test.go index a832c663d7..e0690e2f87 100644 --- a/api/utils/refmgmt/resource/suite_test.go +++ b/api/utils/refmgmt/resource/suite_test.go @@ -9,5 +9,5 @@ import ( func TestConfig(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "Referencable Resource Test Suite") + RunSpecs(t, "Referenceable Resource Test Suite") } diff --git a/api/utils/refmgmt/suite_test.go b/api/utils/refmgmt/suite_test.go index e143a1809d..4245e480e0 100644 --- a/api/utils/refmgmt/suite_test.go +++ b/api/utils/refmgmt/suite_test.go @@ -9,5 +9,5 @@ import ( func TestConfig(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "Referencable Resource Test Suite") + RunSpecs(t, "Referenceable Resource Test Suite") } diff --git a/api/utils/registrations/registrations.go b/api/utils/registrations/registrations.go index 7eecebe793..d4e4ac197a 100644 --- a/api/utils/registrations/registrations.go +++ b/api/utils/registrations/registrations.go @@ -1,7 +1,7 @@ // Package registrations provides a hierarchical namespace for // denoting any kind of handlers to be registered on some target. // Handlers are denoted by names evaluated by HandlerRegistrationHandler -// Such a registration handler is responsible vor a complete sub namespace +// Such a registration handler is responsible for a complete sub namespace // and may delegate the evaluation to nested handler mounted on a sub namespace. package registrations diff --git a/api/utils/runtime/multi_test.go b/api/utils/runtime/multi_test.go index 46f4a435ba..46d4cf23f3 100644 --- a/api/utils/runtime/multi_test.go +++ b/api/utils/runtime/multi_test.go @@ -21,7 +21,7 @@ var _ = Describe("multi version type", func() { multi := Must(runtime.NewMultiFormatVersionedType[TestSpecRealm, TestSpecType](Type1, versions)) - It("decodes plain version wth v2", func() { + It("decodes plain version with v2", func() { s := ` type: ` + Type1 + ` field: sally diff --git a/api/utils/runtime/unstructured.go b/api/utils/runtime/unstructured.go index 5587d98aff..c15e82b51c 100644 --- a/api/utils/runtime/unstructured.go +++ b/api/utils/runtime/unstructured.go @@ -21,15 +21,15 @@ const ATTR_TYPE = "type" // Anonymous inline struct fields are always marshaled by the default struct // marshals in a depth first manner without observing the Marshal interface!!!! // -// Therefore, all structs in this module deriving from UnstructuedTypedObject +// Therefore, all structs in this module deriving from UnstructuredTypedObject // are explicitly implementing the marshal/unmarshal interface. // // Side Fact: Marshaling a map[interface{}] filled by unmarshaling a marshaled // object with anonymous fields is not stable, because the inline fields -// are sorted depth firt for marshalling, while maps key are marshaled +// are sorted depth first for marshalling, while maps key are marshaled // completely in order. // Therefore we do not store the raw bytes but marshal them always from -// the UnstructuedMap. +// the UnstructuredMap. // Unstructured is the interface to represent generic object data for // types handled by schemes. diff --git a/api/utils/runtime/unstructured_test.go b/api/utils/runtime/unstructured_test.go index ed85c6973d..d681d123d9 100644 --- a/api/utils/runtime/unstructured_test.go +++ b/api/utils/runtime/unstructured_test.go @@ -13,7 +13,7 @@ import ( "ocm.software/ocm/api/utils/runtime" ) -func InOut(log logging.Logger, in runtime.TypedObject, encoding runtime.Encoding) (runtime.TypedObject, string, error) { +func getOutput(log logging.Logger, in runtime.TypedObject, encoding runtime.Encoding) (runtime.TypedObject, string, error) { t := reflect.TypeOf(in) log.Info("in", "type", t) for t.Kind() == reflect.Ptr { @@ -59,24 +59,24 @@ var _ = Describe("*** unstructured", func() { }) It("unmarshal json test", func() { - out, data, err := InOut(log, runtime.NewEmptyUnstructured("test"), runtime.DefaultJSONEncoding) + out, data, err := getOutput(log, runtime.NewEmptyUnstructured("test"), runtime.DefaultJSONEncoding) Expect(err).To(Succeed()) Expect(out.GetType()).To(Equal("test")) Expect(data).To(Equal(result)) - out, data, err = InOut(log, runtime.NewEmptyUnstructuredVersioned("test"), runtime.DefaultJSONEncoding) + out, data, err = getOutput(log, runtime.NewEmptyUnstructuredVersioned("test"), runtime.DefaultJSONEncoding) Expect(err).To(Succeed()) Expect(out.GetType()).To(Equal("test")) Expect(data).To(Equal(result)) }) It("unmarshal yaml test", func() { - out, data, err := InOut(log, runtime.NewEmptyUnstructured("test"), runtime.DefaultYAMLEncoding) + out, data, err := getOutput(log, runtime.NewEmptyUnstructured("test"), runtime.DefaultYAMLEncoding) Expect(err).To(Succeed()) Expect(out.GetType()).To(Equal("test")) Expect(data).To(Equal("type: test\n")) - out, data, err = InOut(log, runtime.NewEmptyUnstructuredVersioned("test"), runtime.DefaultYAMLEncoding) + out, data, err = getOutput(log, runtime.NewEmptyUnstructuredVersioned("test"), runtime.DefaultYAMLEncoding) Expect(err).To(Succeed()) Expect(out.GetType()).To(Equal("test")) Expect(data).To(Equal("type: test\n")) diff --git a/api/utils/runtime/validate.go b/api/utils/runtime/validate.go index 91efdd7671..1b8e34836c 100644 --- a/api/utils/runtime/validate.go +++ b/api/utils/runtime/validate.go @@ -4,7 +4,7 @@ import ( "github.com/mandelsoft/goutils/errors" ) -type Validater interface { +type Validater interface { // codespell:ignore Validate() error } @@ -14,7 +14,7 @@ func Validate(o interface{}) error { return errors.New("type missing") } } - if v, ok := o.(Validater); ok { + if v, ok := o.(Validater); ok { // codespell:ignore return v.Validate() } return nil diff --git a/api/utils/runtime/versionedtype.go b/api/utils/runtime/versionedtype.go index dce59ad28d..49993a4ae9 100644 --- a/api/utils/runtime/versionedtype.go +++ b/api/utils/runtime/versionedtype.go @@ -65,7 +65,7 @@ func NewInternalVersionedTypedObject[T VersionedTypedObject](encoder TypedObject } func (o *InternalVersionedTypedObject[T]) encode(obj VersionedTypedObject) ([]byte, error) { - // cannot use type parameter here, because casts of paramerized objects are not supported in GO + // cannot use type parameter here, because casts of parameterized objects are not supported in GO return o.encoder.Encode(obj.(T), DefaultJSONEncoding) } diff --git a/api/utils/subst/subst.go b/api/utils/subst/subst.go index 55be2c96a4..d96b221194 100644 --- a/api/utils/subst/subst.go +++ b/api/utils/subst/subst.go @@ -134,7 +134,7 @@ func (f *fileinfo) SubstituteByData(path string, value []byte) error { // attempt to re-enode the value as yaml before inserting into the target document. // However... we don't want to perform re-encoding for everything because if the // value is actually yaml with some snippets in json style for readability - // purposes we don't want to unecessarily lose that styling. Hence the initial + // purposes we don't want to unnecessarily lose that styling. Hence the initial // sniff test for json instead of always re-encoding. var valueData interface{} if err = runtime.DefaultJSONEncoding.Unmarshal(value, &valueData); err == nil { @@ -149,16 +149,16 @@ func (f *fileinfo) SubstituteByData(path string, value []byte) error { return err } - nd := &yqlib.CandidateNode{} - nd.SetDocument(0) - nd.SetFilename("value") - nd.SetFileIndex(0) + n := &yqlib.CandidateNode{} + n.SetDocument(0) + n.SetFilename("value") + n.SetFileIndex(0) - if err = nd.UnmarshalYAML(m.Content[0], map[string]*yqlib.CandidateNode{}); err != nil { + if err = n.UnmarshalYAML(m.Content[0], map[string]*yqlib.CandidateNode{}); err != nil { return err } - return f.substituteByValue(path, nd) + return f.substituteByValue(path, n) } func (f *fileinfo) SubstituteByValue(path string, value interface{}) error { @@ -190,12 +190,12 @@ func (f *fileinfo) substituteByValue(path string, value *yqlib.CandidateNode) er yqlib.InitExpressionParser() expr := "." + path + " |= $newValue" - nd, err := yqlib.ExpressionParser.ParseExpression(expr) + expressionNode, err := yqlib.ExpressionParser.ParseExpression(expr) if err != nil { return err } ngvtr := yqlib.NewDataTreeNavigator() - _, err = ngvtr.GetMatchingNodes(ctxt, nd) + _, err = ngvtr.GetMatchingNodes(ctxt, expressionNode) return err } diff --git a/api/utils/subst/subst_test.go b/api/utils/subst/subst_test.go index 6ee31cfba8..fe27ceeb05 100644 --- a/api/utils/subst/subst_test.go +++ b/api/utils/subst/subst_test.go @@ -184,7 +184,7 @@ space: sac` Expect(string(result)).To(MatchYAML(expected)) }) - It("Converts json subtitution to yaml when destination is yaml doc", func() { + It("Converts json substitution to yaml when destination is yaml doc", func() { value := `{ "certificate_authority_url": "https://example1.com/v1/pki/root/ca/pem", "deployment": "deveaws", diff --git a/cmds/helminstaller/app/execute.go b/cmds/helminstaller/app/execute.go index 786515be1c..322198aca0 100644 --- a/cmds/helminstaller/app/execute.go +++ b/cmds/helminstaller/app/execute.go @@ -204,7 +204,7 @@ func (e *Execution) Execute(cfg *Config, values map[string]interface{}, kubeconf tag := ref[ix+1:] if v.Repository != "" { e.Logger.Debug("substitute image repository", "ref", ref, "target", v.Repository) - Mustf(Set(values, v.Repository, repo), "mapping %d: assigning repositry to property %q", v.Repository) + Mustf(Set(values, v.Repository, repo), "mapping %d: assigning repository to property %q", v.Repository) } if v.Tag != "" { e.Logger.Debug("substitute image tag", "ref", ref, "target", v.Tag) diff --git a/cmds/jfrogplugin/main_test.go b/cmds/jfrogplugin/main_test.go index d279c9168a..c119197ee5 100644 --- a/cmds/jfrogplugin/main_test.go +++ b/cmds/jfrogplugin/main_test.go @@ -159,7 +159,7 @@ var _ = Describe(helm.VERSIONED_NAME, func() { http.Error(w, fmt.Sprintf("failed to marshal response: %v", err), http.StatusInternalServerError) } - // mimick the upload response + // mimic the upload response w.WriteHeader(http.StatusCreated) if _, err := io.Copy(w, bytes.NewReader(resData)); err != nil { Fail(fmt.Sprintf("failed to write response: %v", err)) @@ -202,7 +202,7 @@ var _ = Describe(helm.VERSIONED_NAME, func() { Expect(splitChart).To(HaveLen(2), "helm chart is separated with version") Expect(splitChart[0]).To(Equal("test-chart"), "the chart name should be test-chart") Expect(splitChart[1]).To(Equal("0.1.0"), "the chart version should be 0.1.0") - Expect(reindexedAfterUpload).To(BeFalse(), "the server should not have been reindexed as it wasnt requested explicitly") + Expect(reindexedAfterUpload).To(BeFalse(), "the server should not have been re-indexed as it wasn't requested explicitly") }) It("Upload Artifact Set to Server (with reindex) with Basic Auth", func(ctx SpecContext) { @@ -239,6 +239,6 @@ var _ = Describe(helm.VERSIONED_NAME, func() { Expect(splitChart).To(HaveLen(2), "helm chart is separated with version") Expect(splitChart[0]).To(Equal("test-chart"), "the chart name should be test-chart") Expect(splitChart[1]).To(Equal("0.1.0"), "the chart version should be 0.1.0") - Expect(reindexedAfterUpload).To(BeTrue(), "the server should not have been reindexed as it wasnt requested explicitly") + Expect(reindexedAfterUpload).To(BeTrue(), "the server should not have been re-indexed as it wasn't requested explicitly") }) }) diff --git a/cmds/jfrogplugin/uploaders/helm/helm.go b/cmds/jfrogplugin/uploaders/helm/helm.go index da1f4d30fe..e5ceff16f5 100644 --- a/cmds/jfrogplugin/uploaders/helm/helm.go +++ b/cmds/jfrogplugin/uploaders/helm/helm.go @@ -143,7 +143,7 @@ func (a *Uploader) ValidateSpecification(_ ppi.Plugin, spec ppi.UploadTargetSpec // 2. building an Artifactory Style JFrog Upload URL out of it (see ConvertTargetSpecToHelmUploadURL), // 3. creating a request respecting the passed credentials based on SetHeadersFromCredentials // 4. uploading the passed blob as is (expected to be a tgz byte stream) -// 5. intepreting the JFrog API response, and converting it from ArtifactoryUploadResponse to ppi.AccessSpec +// 5. interpreting the JFrog API response, and converting it from ArtifactoryUploadResponse to ppi.AccessSpec func (a *Uploader) Upload( ctx context.Context, p ppi.Plugin, diff --git a/cmds/ocm/commands/misccmds/hash/sign/cmd.go b/cmds/ocm/commands/misccmds/hash/sign/cmd.go index 75ed77c48f..db6cf1d299 100644 --- a/cmds/ocm/commands/misccmds/hash/sign/cmd.go +++ b/cmds/ocm/commands/misccmds/hash/sign/cmd.go @@ -79,7 +79,7 @@ func (o *Command) Complete(args []string) error { var err error if len(args) < 2 { - return fmt.Errorf("key file and hash argumnt required") + return fmt.Errorf("key file and hash argument required") } if len(args) > 3 { return fmt.Errorf("too many arguments") diff --git a/cmds/ocm/commands/ocicmds/artifacts/transfer/cmd.go b/cmds/ocm/commands/ocicmds/artifacts/transfer/cmd.go index 728d48343c..383c77f47b 100644 --- a/cmds/ocm/commands/ocicmds/artifacts/transfer/cmd.go +++ b/cmds/ocm/commands/ocicmds/artifacts/transfer/cmd.go @@ -166,12 +166,12 @@ func NewAction(ctx clictx.Context, session oci.Session, target string, transferR func (a *action) Add(e interface{}) error { src, ok := e.(*artifacthdlr.Object) if !ok { - return fmt.Errorf("failed type assertion for type %T to artifacthtlr.Object", e) + return fmt.Errorf("failed type assertion for type %T to artifacthdlr.Object", e) } ns := src.Namespace.GetNamespace() if ns == "" && a.Ref.IsRegistry() { - return errors.Newf("target repository equired for repository-less artifact") + return errors.Newf("target repository required for repository-less artifact") } versions, ok := a.repositories[ns] if !ok { diff --git a/cmds/ocm/commands/ocicmds/common/handlers/artifacthdlr/closure.go b/cmds/ocm/commands/ocicmds/common/handlers/artifacthdlr/closure.go index 129a018a27..082cacf0a5 100644 --- a/cmds/ocm/commands/ocicmds/common/handlers/artifacthdlr/closure.go +++ b/cmds/ocm/commands/ocicmds/common/handlers/artifacthdlr/closure.go @@ -34,7 +34,7 @@ func traverse(hist common.History, o *Object, octx out.Context) []output.Object for _, ref := range refs { key := common.NewNameVersion("", ref.Digest.String()) if found[key] { - continue // skip same ref wit different attributes for recursion + continue // skip same ref with different attributes for recursion } found[key] = true nested, err := o.Namespace.GetArtifact(key.GetVersion()) diff --git a/cmds/ocm/commands/ocicmds/tags/show/cmd_test.go b/cmds/ocm/commands/ocicmds/tags/show/cmd_test.go index 6b36dbeeb5..5fc1eba0f0 100644 --- a/cmds/ocm/commands/ocicmds/tags/show/cmd_test.go +++ b/cmds/ocm/commands/ocicmds/tags/show/cmd_test.go @@ -14,7 +14,7 @@ import ( const ( ARCH = "/tmp/ctf" - NAMESAPCE = "mandelsoft/test" + NAMESPACE = "mandelsoft/test" V13 = "v1.3" V131 = "v1.3.1" V132 = "v1.3.2" @@ -30,7 +30,7 @@ var _ = Describe("Show OCI Tags", func() { env = NewTestEnv() env.OCICommonTransport(ARCH, accessio.FormatDirectory, func() { - env.Namespace(NAMESAPCE, func() { + env.Namespace(NAMESPACE, func() { env.Manifest(V13, func() { env.Tags(V131, OTHERVERS) env.Config(func() { @@ -75,7 +75,7 @@ var _ = Describe("Show OCI Tags", func() { It("lists tags", func() { buf := bytes.NewBuffer(nil) - Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--repo", ARCH, NAMESAPCE)).To(Succeed()) + Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--repo", ARCH, NAMESPACE)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext(` sometag v1.3 @@ -89,7 +89,7 @@ v2.0 It("lists tags for same artifact", func() { buf := bytes.NewBuffer(nil) - Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--repo", ARCH, NAMESAPCE+":"+V13)).To(Succeed()) + Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--repo", ARCH, NAMESPACE+":"+V13)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext(` sometag v1.3 @@ -99,7 +99,7 @@ v1.3.1 It("lists semver tags", func() { buf := bytes.NewBuffer(nil) - Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--semver", "--repo", ARCH, NAMESAPCE)).To(Succeed()) + Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--semver", "--repo", ARCH, NAMESPACE)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext(` v1.3 v1.3.1 @@ -112,7 +112,7 @@ v2.0 It("lists semver tags for same artifact", func() { buf := bytes.NewBuffer(nil) - Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--semver", "--repo", ARCH, NAMESAPCE+":"+V13)).To(Succeed()) + Expect(env.CatchOutput(buf).Execute("oci", "tags", "show", "--semver", "--repo", ARCH, NAMESPACE+":"+V13)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext(` v1.3 v1.3.1 diff --git a/cmds/ocm/commands/ocmcmds/common/handlers/comphdlr/closure.go b/cmds/ocm/commands/ocmcmds/common/handlers/comphdlr/closure.go index 120f1172f3..2dcd8861dd 100644 --- a/cmds/ocm/commands/ocmcmds/common/handlers/comphdlr/closure.go +++ b/cmds/ocm/commands/ocmcmds/common/handlers/comphdlr/closure.go @@ -31,7 +31,7 @@ func traverse(hist common.History, o *Object, octx out.Context, sess ocm.Session for _, ref := range refs { key := ocm.ComponentRefKey(&ref) if found[key] { - continue // skip same ref wit different attributes for recursion + continue // skip same ref with different attributes for recursion } found[key] = true vers := ref.Version diff --git a/cmds/ocm/commands/ocmcmds/common/inputs/cpi/helper.go b/cmds/ocm/commands/ocmcmds/common/inputs/cpi/helper.go index 2646ae99a7..8e2da5d558 100644 --- a/cmds/ocm/commands/ocmcmds/common/inputs/cpi/helper.go +++ b/cmds/ocm/commands/ocmcmds/common/inputs/cpi/helper.go @@ -135,7 +135,7 @@ const ProcessSpecUsage = ` //////////////////////////////////////////////////////////////////////////////// type MediaFileSpec struct { - // PathSpec holds the path that points to a file to be the base for the imput + // PathSpec holds the path that points to a file to be the base for the input PathSpec `json:",inline"` ProcessSpec `json:",inline"` } diff --git a/cmds/ocm/commands/ocmcmds/common/options/comppathopt/option.go b/cmds/ocm/commands/ocmcmds/common/options/comppathopt/option.go index d25df13c39..f91533e1ca 100644 --- a/cmds/ocm/commands/ocmcmds/common/options/comppathopt/option.go +++ b/cmds/ocm/commands/ocmcmds/common/options/comppathopt/option.go @@ -39,7 +39,7 @@ func (o *Option) Complete(args []string) ([]string, error) { func (o *Option) Usage() string { s := ` -The --path options accets a sequence of identities, +The --path options accepts a sequence of identities, that will be used to follow component references a the specified component(s). diff --git a/cmds/ocm/commands/ocmcmds/common/options/optutils/registration.go b/cmds/ocm/commands/ocmcmds/common/options/optutils/registration.go index 44b0da8344..e6bd620a98 100644 --- a/cmds/ocm/commands/ocmcmds/common/options/optutils/registration.go +++ b/cmds/ocm/commands/ocmcmds/common/options/optutils/registration.go @@ -57,13 +57,13 @@ func (o *RegistrationOption) HasRegistrations() bool { func (o *RegistrationOption) Configure(ctx clictx.Context) error { for n, v := range o.spec { var prio *int - nam := n + name := n art := "" med := "" - i := strings.Index(nam, ":") + i := strings.Index(name, ":") if i >= 0 { - art = nam[i+1:] - nam = nam[:i] + art = name[i+1:] + name = name[:i] } i = strings.Index(art, ":") if i >= 0 { @@ -112,7 +112,7 @@ func (o *RegistrationOption) Configure(ctx clictx.Context) error { } o.Registrations = append(o.Registrations, &Registration{ - Name: nam, + Name: name, ArtifactType: art, MediaType: med, Prio: prio, diff --git a/cmds/ocm/commands/ocmcmds/components/check/cmd_test.go b/cmds/ocm/commands/ocmcmds/components/check/cmd_test.go index e2afb691b8..a48915c6ca 100644 --- a/cmds/ocm/commands/ocmcmds/components/check/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/components/check/cmd_test.go @@ -35,7 +35,7 @@ var _ = Describe("Test Environment", func() { env.Cleanup() }) - It("get checks refereces", func() { + It("get checks references", func() { env.OCMCommonTransport(ARCH, accessio.FormatDirectory, func() { env.ComponentVersion(COMP, VERSION, func() { env.Reference("ref", COMP3, VERSION) diff --git a/cmds/ocm/commands/ocmcmds/components/get/cmd_test.go b/cmds/ocm/commands/ocmcmds/components/get/cmd_test.go index 0287c89946..2b395a4122 100644 --- a/cmds/ocm/commands/ocmcmds/components/get/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/components/get/cmd_test.go @@ -145,7 +145,7 @@ test.de/x v2 mandelsoft `)) }) - It("lists constrainted version", func() { + It("lists constrained version", func() { buf := bytes.NewBuffer(nil) Expect(env.CatchOutput(buf).Execute("get", "components", "--constraints", ">1.0", "--repo", ARCH, COMP)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext( @@ -156,7 +156,7 @@ test.de/x v2 mandelsoft `)) }) - It("lists constrainted version", func() { + It("lists constrained version", func() { buf := bytes.NewBuffer(nil) Expect(env.CatchOutput(buf).Execute("get", "components", "--constraints", "1.x.x", "--latest", "--repo", ARCH, COMP)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext( diff --git a/cmds/ocm/commands/ocmcmds/components/list/cmd_test.go b/cmds/ocm/commands/ocmcmds/components/list/cmd_test.go index d5a453debc..287dfbcc20 100644 --- a/cmds/ocm/commands/ocmcmds/components/list/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/components/list/cmd_test.go @@ -125,7 +125,7 @@ test.de/x v2 `)) }) - It("lists constrainted version", func() { + It("lists constrained version", func() { buf := bytes.NewBuffer(nil) Expect(env.CatchOutput(buf).Execute("list", "components", "--constraints", ">1.0", "--repo", ARCH, COMP)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext( @@ -136,7 +136,7 @@ test.de/x v2 `)) }) - It("lists constrainted version", func() { + It("lists constrained version", func() { buf := bytes.NewBuffer(nil) Expect(env.CatchOutput(buf).Execute("list", "components", "--constraints", "1.x.x", "--latest", "--repo", ARCH, COMP)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext( diff --git a/cmds/ocm/commands/ocmcmds/references/add/cmd_test.go b/cmds/ocm/commands/ocmcmds/references/add/cmd_test.go index ad9353dffe..f3d90f2e75 100644 --- a/cmds/ocm/commands/ocmcmds/references/add/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/references/add/cmd_test.go @@ -57,7 +57,7 @@ var _ = Describe("Add references", func() { CheckReference(env, cd, "testdata") }) - It("adds simple ref wth extra identity", func() { + It("adds simple ref with extra identity", func() { Expect(env.Execute("add", "references", "--file", ARCH, "/testdata/referenceswithid.yaml")).To(Succeed()) data, err := env.ReadFile(env.Join(ARCH, comparch.ComponentDescriptorFileName)) Expect(err).To(Succeed()) diff --git a/cmds/ocm/commands/ocmcmds/references/get/cmd_test.go b/cmds/ocm/commands/ocmcmds/references/get/cmd_test.go index d35fdf6317..156032d560 100644 --- a/cmds/ocm/commands/ocmcmds/references/get/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/references/get/cmd_test.go @@ -90,7 +90,7 @@ COMPONENTVERSION NAME COMPONENT VERSION IDENTITY `)) }) - It("lits reference closure in ctf file", func() { + It("list reference closure in ctf file", func() { buf := bytes.NewBuffer(nil) Expect(env.CatchOutput(buf).Execute("get", "references", "-r", "-o", "tree", "--lookup", CTF, CA)).To(Succeed()) Expect(buf.String()).To(StringEqualTrimmedWithContext( diff --git a/cmds/ocm/commands/ocmcmds/resources/download/cmd.go b/cmds/ocm/commands/ocmcmds/resources/download/cmd.go index e4bb3797ea..4d0415ac60 100644 --- a/cmds/ocm/commands/ocmcmds/resources/download/cmd.go +++ b/cmds/ocm/commands/ocmcmds/resources/download/cmd.go @@ -63,7 +63,7 @@ func (o *Command) ForName(name string) *cobra.Command { Short: "download resources of a component version", Long: ` Download resources of a component version. Resources are specified -by identities. An identity consists of +by identities. An identity consists of a name argument followed by optional <key>=<value> arguments. @@ -149,7 +149,7 @@ func (o *Command) Run() (err error) { if storeoption.From(o).Store != nil { if From(opts).UseHandlers { - return errors.Newf("verification fot supported together with download handlers") + return errors.Newf("verification for supported together with download handlers") } } diff --git a/cmds/ocm/commands/ocmcmds/resources/get/cmd_test.go b/cmds/ocm/commands/ocmcmds/resources/get/cmd_test.go index 3714de7cf7..55ea3d8afc 100644 --- a/cmds/ocm/commands/ocmcmds/resources/get/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/resources/get/cmd_test.go @@ -51,7 +51,7 @@ testdata v1 PlainText local `)) }) - It("lists ambigious resource in component archive", func() { + It("lists ambiguous resource in component archive", func() { env.ComponentArchive(ARCH, accessio.FormatDirectory, COMP, VERSION, func() { env.Provider(PROVIDER) env.Resource("testdata", "", "PlainText", metav1.LocalRelation, func() { diff --git a/cmds/ocm/commands/ocmcmds/routingslips/get/cmd_test.go b/cmds/ocm/commands/ocmcmds/routingslips/get/cmd_test.go index 511e04ef29..302f27d4a3 100644 --- a/cmds/ocm/commands/ocmcmds/routingslips/get/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/routingslips/get/cmd_test.go @@ -105,11 +105,11 @@ test.de/x:v1 acme.org comment ` + e1a.Timestamp.String() + ` Comment: first e2a = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, comment.New("first other entry"), nil)) e2b = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, comment.New("second other entry"), nil)) - te := Must(routingslip.NewGenericEntryWith("acme.org/test", + entry := Must(routingslip.NewGenericEntryWith("acme.org/test", "name", "unit-tests", "status", "passed", )) - e2c = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, te, nil)) + e2c = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, entry, nil)) MustBeSuccessful(cv.Update()) }) diff --git a/cmds/ocm/commands/ocmcmds/sources/get/cmd_test.go b/cmds/ocm/commands/ocmcmds/sources/get/cmd_test.go index 131846460b..60fc309dad 100644 --- a/cmds/ocm/commands/ocmcmds/sources/get/cmd_test.go +++ b/cmds/ocm/commands/ocmcmds/sources/get/cmd_test.go @@ -51,7 +51,7 @@ testdata v1 git `)) }) - It("lists ambigious source in component archive", func() { + It("lists ambiguous source in component archive", func() { env.ComponentArchive(ARCH, accessio.FormatDirectory, COMP, VERSION, func() { env.Provider(PROVIDER) env.Source("testdata", "v1", "git", func() { diff --git a/cmds/ocm/common/options/interfaces.go b/cmds/ocm/common/options/interfaces.go index 68caba0413..1768e71297 100644 --- a/cmds/ocm/common/options/interfaces.go +++ b/cmds/ocm/common/options/interfaces.go @@ -153,7 +153,7 @@ func (s OptionSet) Get(proto interface{}) bool { } // ProcessOnOptions processes all options found in the option set -// woth a given OptionsProcessor. +// with a given OptionsProcessor. func (s OptionSet) ProcessOnOptions(f OptionsProcessor) error { for _, n := range s { var err error diff --git a/cmds/ocm/common/utils/command.go b/cmds/ocm/common/utils/command.go index 2cdba95667..539526fe99 100644 --- a/cmds/ocm/common/utils/command.go +++ b/cmds/ocm/common/utils/command.go @@ -174,7 +174,7 @@ func updateFunction[T any](f func(cmd *cobra.Command, args []string), source OCM // SetupCommand uses the OCMCommand to create and tweak a cobra command // to incorporate the additional reusable option specs and their usage documentation. // Before the command executions the various Complete method flavors are -// executed on the additional options ond the OCMCommand. +// executed on the additional options on the OCMCommand. // It also prepares the help system to reflect dynamic settings provided // by root command options by using a generated update function based // on optional methods of the OCM command. diff --git a/cmds/ocm/common/utils/handling.go b/cmds/ocm/common/utils/handling.go index 1d65e8cedd..21138a7d02 100644 --- a/cmds/ocm/common/utils/handling.go +++ b/cmds/ocm/common/utils/handling.go @@ -22,8 +22,8 @@ func (s StringSpec) String() string { } // TypeHandler provides base input to an output processing chain -// using HandleArsg or HandleOutput(s). -// It provides the exploding of intials specifications +// using HandleArgs or HandleOutput(s). +// It provides the exploding of initials specifications // to effective objects passed to the output processing chain. type TypeHandler interface { // All returns all elements according to its context diff --git a/cmds/ocm/topics/toi/bootstrapping/topic.go b/cmds/ocm/topics/toi/bootstrapping/topic.go index 5b81157450..85bbf83bf3 100644 --- a/cmds/ocm/topics/toi/bootstrapping/topic.go +++ b/cmds/ocm/topics/toi/bootstrapping/topic.go @@ -1,4 +1,4 @@ -package bootstapping +package bootstrapping import ( "github.com/spf13/cobra" diff --git a/config/crd/bases/ocm.open-component-model.software_componentdescriptors.yaml b/config/crd/bases/ocm.open-component-model.software_componentdescriptors.yaml index 02930a6651..30d42f6828 100644 --- a/config/crd/bases/ocm.open-component-model.software_componentdescriptors.yaml +++ b/config/crd/bases/ocm.open-component-model.software_componentdescriptors.yaml @@ -65,7 +65,7 @@ spec: additionalProperties: type: string description: ExtraIdentity is the identity of an object. An - additional label with key "name" ist not allowed + additional label with key "name" is not allowed type: object labels: description: Labels defines an optional set of additional labels @@ -190,7 +190,7 @@ spec: additionalProperties: type: string description: ExtraIdentity is the identity of an object. An - additional label with key "name" ist not allowed + additional label with key "name" is not allowed type: object labels: description: Labels defines an optional set of additional labels @@ -301,7 +301,7 @@ spec: additionalProperties: type: string description: ExtraIdentity is the identity of an object. An - additional label with key "name" ist not allowed + additional label with key "name" is not allowed type: object labels: description: Labels defines an optional set of additional labels @@ -413,7 +413,7 @@ spec: additionalProperties: type: string description: ExtraIdentity is the identity of an object. An - additional label with key "name" ist not allowed + additional label with key "name" is not allowed type: object labels: description: Labels defines an optional set of additional labels @@ -490,7 +490,7 @@ spec: additionalProperties: type: string description: ExtraIdentity is the identity of an object. An - additional label with key "name" ist not allowed + additional label with key "name" is not allowed type: object labels: description: Labels defines an optional set of additional labels @@ -601,7 +601,7 @@ spec: additionalProperties: type: string description: ExtraIdentity is the identity of an object. An - additional label with key "name" ist not allowed + additional label with key "name" is not allowed type: object labels: description: Labels defines an optional set of additional labels diff --git a/docs/reference/ocm_logging.md b/docs/reference/ocm_logging.md index 282772ff96..0283de889d 100644 --- a/docs/reference/ocm_logging.md +++ b/docs/reference/ocm_logging.md @@ -39,7 +39,7 @@ The following *realms* are used by the command line tool: - ocm/refcnt: reference counting - ocm/toi: TOI logging - ocm/transfer: OCM transfer handling - - ocm/valuemerge: value marge handling + - ocm/valuemerge: value merge handling ### Examples diff --git a/examples/lib/comparison-scenario/00-consumer.go b/examples/lib/comparison-scenario/00-consumer.go index a4c667827c..b1b346722b 100644 --- a/examples/lib/comparison-scenario/00-consumer.go +++ b/examples/lib/comparison-scenario/00-consumer.go @@ -70,7 +70,7 @@ func Consumer(cfg *helper.Config) error { PrintConsumerId(repo, "local repository") //////////////////////////////////////////////////////////////////////////// - fmt.Printf("*** transfer compoment version\n") + fmt.Printf("*** transfer component version\n") // first, get the version into the local environment err = TransportTo(repo, cfg.Repository) diff --git a/examples/lib/tour/01-getting-started/example.go b/examples/lib/tour/01-getting-started/example.go index c84fe58f06..dbd69cc38b 100644 --- a/examples/lib/tour/01-getting-started/example.go +++ b/examples/lib/tour/01-getting-started/example.go @@ -192,7 +192,7 @@ func GettingStarted() error { defer m.Close() // --- end closing access --- - // the method now also provides information abount the returned + // the method now also provides information about the returned // blob format in form of a mime type. // --- begin getting reader --- fmt.Printf(" found blob with mime type %s\n", m.MimeType()) diff --git a/examples/lib/tour/02-composing-a-component-version/01-basic-componentversion-creation.go b/examples/lib/tour/02-composing-a-component-version/01-basic-componentversion-creation.go index 829e3ad905..04c69aa0c6 100644 --- a/examples/lib/tour/02-composing-a-component-version/01-basic-componentversion-creation.go +++ b/examples/lib/tour/02-composing-a-component-version/01-basic-componentversion-creation.go @@ -239,7 +239,7 @@ func addVersion(repo ocm.Repository, name, version string) error { return errors.Wrapf(err, "cannot setup new version") } - // finally, wee add the new version to the repository. + // finally, we add the new version to the repository. fmt.Printf("adding component version\n") err = repo.AddComponentVersion(cv) if err != nil { diff --git a/examples/lib/tour/03-working-with-credentials/README.md b/examples/lib/tour/03-working-with-credentials/README.md index 3bcaef8904..3202d5eab4 100644 --- a/examples/lib/tour/03-working-with-credentials/README.md +++ b/examples/lib/tour/03-working-with-credentials/README.md @@ -95,7 +95,7 @@ in `common.go` (It is shared by the other examples, also). return errors.Wrapf(err, "cannot setup new version") } - // finally, wee add the new version to the repository. + // finally, we add the new version to the repository. fmt.Printf("adding component version\n") err = repo.AddComponentVersion(cv) if err != nil { diff --git a/examples/lib/tour/03-working-with-credentials/common.go b/examples/lib/tour/03-working-with-credentials/common.go index fa71848091..aa2f05fafa 100644 --- a/examples/lib/tour/03-working-with-credentials/common.go +++ b/examples/lib/tour/03-working-with-credentials/common.go @@ -193,7 +193,7 @@ func addVersion(repo ocm.Repository, name, version string) error { return errors.Wrapf(err, "cannot setup new version") } - // finally, wee add the new version to the repository. + // finally, we add the new version to the repository. fmt.Printf("adding component version\n") err = repo.AddComponentVersion(cv) if err != nil { diff --git a/examples/lib/tour/05-transporting-component-versions/common.go b/examples/lib/tour/05-transporting-component-versions/common.go index 6e3356759b..b05dcebe2c 100644 --- a/examples/lib/tour/05-transporting-component-versions/common.go +++ b/examples/lib/tour/05-transporting-component-versions/common.go @@ -191,7 +191,7 @@ func addVersion(repo ocm.Repository, name, version string) error { return errors.Wrapf(err, "cannot setup new version") } - // finally, wee add the new version to the repository. + // finally, we add the new version to the repository. fmt.Printf("adding component version\n") err = repo.AddComponentVersion(cv) if err != nil { diff --git a/examples/lib/tour/06-signing-component-versions/common.go b/examples/lib/tour/06-signing-component-versions/common.go index 22e684896b..f7c04737b9 100644 --- a/examples/lib/tour/06-signing-component-versions/common.go +++ b/examples/lib/tour/06-signing-component-versions/common.go @@ -197,7 +197,7 @@ func addVersion(repo ocm.Repository, name, version string) error { return errors.Wrapf(err, "cannot setup new version") } - // finally, wee add the new version to the repository. + // finally, we add the new version to the repository. fmt.Printf("adding component version\n") err = repo.AddComponentVersion(cv) if err != nil { diff --git a/examples/lib/transfer.md b/examples/lib/transfer.md index 559c9e72a5..6f1aca1e9a 100644 --- a/examples/lib/transfer.md +++ b/examples/lib/transfer.md @@ -119,7 +119,7 @@ get access to the intended target repository: To parse an OCM repository reference you can use the `ParseRepo` function. It provides a uniform representation of a parsed string representation. -This one can then be mapped to a regular `RespositorySpec` object, which is mapped by the OCM context to a repository implementation. +This one can then be mapped to a regular `RepositorySpec` object, which is mapped by the OCM context to a repository implementation. Instead of this string parsing, an appropriate repository specification object can directly be created as shown in the other examples.