This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push: new c30bd01 chore: fix lint finding c30bd01 is described below commit c30bd01bc0ca81e6884b872913c531c9c3ccbb98 Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Tue May 28 07:09:41 2019 +0200 chore: fix lint finding --- pkg/apis/camel/v1alpha1/common_types_support.go | 1 - pkg/apis/camel/v1alpha1/integration_types_support.go | 4 ++-- pkg/trait/deployment.go | 8 ++++---- pkg/trait/knative.go | 2 +- pkg/trait/trait_catalog.go | 3 ++- pkg/trait/util.go | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/apis/camel/v1alpha1/common_types_support.go b/pkg/apis/camel/v1alpha1/common_types_support.go index 2e45408..364150e 100644 --- a/pkg/apis/camel/v1alpha1/common_types_support.go +++ b/pkg/apis/camel/v1alpha1/common_types_support.go @@ -39,4 +39,3 @@ func (flows Flows) Serialize() (string, error) { } return string(res), nil } - diff --git a/pkg/apis/camel/v1alpha1/integration_types_support.go b/pkg/apis/camel/v1alpha1/integration_types_support.go index b008864..e7e089c 100644 --- a/pkg/apis/camel/v1alpha1/integration_types_support.go +++ b/pkg/apis/camel/v1alpha1/integration_types_support.go @@ -85,8 +85,8 @@ func (is *IntegrationSpec) AddDependency(dependency string) { is.Dependencies = make([]string, 0) } newDep := dependency - if (strings.HasPrefix(newDep, "camel-")) { - newDep = "camel:"+strings.TrimPrefix(dependency, "camel-") + if strings.HasPrefix(newDep, "camel-") { + newDep = "camel:" + strings.TrimPrefix(dependency, "camel-") } for _, d := range is.Dependencies { if d == newDep { diff --git a/pkg/trait/deployment.go b/pkg/trait/deployment.go index 91bf938..a6cc1c4 100644 --- a/pkg/trait/deployment.go +++ b/pkg/trait/deployment.go @@ -144,9 +144,9 @@ func (t *deploymentTrait) getDeploymentFor(e *Environment) *appsv1.Deployment { APIVersion: appsv1.SchemeGroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ - Name: e.Integration.Name, - Namespace: e.Integration.Namespace, - Labels: labels, + Name: e.Integration.Name, + Namespace: e.Integration.Namespace, + Labels: labels, Annotations: annotations, }, Spec: appsv1.DeploymentSpec{ @@ -156,7 +156,7 @@ func (t *deploymentTrait) getDeploymentFor(e *Environment) *appsv1.Deployment { }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ - Labels: labels, + Labels: labels, Annotations: annotations, }, Spec: corev1.PodSpec{ diff --git a/pkg/trait/knative.go b/pkg/trait/knative.go index 6b15d24..698bee5 100644 --- a/pkg/trait/knative.go +++ b/pkg/trait/knative.go @@ -195,7 +195,7 @@ func (t *knativeTrait) configureChannels(e *Environment, env *knativeapi.CamelEn Port: 8080, Protocol: knativeapi.CamelProtocolHTTP, ServiceType: knativeapi.CamelServiceTypeChannel, - Metadata: meta, + Metadata: meta, } env.Services = append(env.Services, svc) } diff --git a/pkg/trait/trait_catalog.go b/pkg/trait/trait_catalog.go index 54b1850..ca36acb 100644 --- a/pkg/trait/trait_catalog.go +++ b/pkg/trait/trait_catalog.go @@ -266,7 +266,8 @@ func (c *Catalog) configureTraits(traits map[string]v1alpha1.TraitSpec) error { for id, traitSpec := range traits { catTrait := c.GetTrait(id) if catTrait != nil { - if err := decodeTraitSpec(&traitSpec, catTrait); err != nil { + trait := traitSpec + if err := decodeTraitSpec(&trait, catTrait); err != nil { return err } } diff --git a/pkg/trait/util.go b/pkg/trait/util.go index 4355c8d..fea765d 100644 --- a/pkg/trait/util.go +++ b/pkg/trait/util.go @@ -141,7 +141,7 @@ func FilterTransferableAnnotations(annotations map[string]string) map[string]str // filter out kubectl annotations continue } - res[k]=v + res[k] = v } return res }