From commits-return-72861-archive-asf-public=cust-asf.ponee.io@camel.apache.org Tue May 28 10:01:31 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A7FBF18060F for ; Tue, 28 May 2019 12:01:30 +0200 (CEST) Received: (qmail 498 invoked by uid 500); 28 May 2019 10:01:30 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 489 invoked by uid 99); 28 May 2019 10:01:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 May 2019 10:01:30 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id C08D08A124; Tue, 28 May 2019 10:01:24 +0000 (UTC) Date: Tue, 28 May 2019 10:01:24 +0000 To: "commits@camel.apache.org" Subject: [camel-k] branch master updated: chore: fix lint finding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155903768469.25216.15875589439597378905@gitbox.apache.org> From: astefanutti@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: camel-k X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: cc0e15c7d4046f90b22355486cca3e3b2af3b9ce X-Git-Newrev: c30bd01bc0ca81e6884b872913c531c9c3ccbb98 X-Git-Rev: c30bd01bc0ca81e6884b872913c531c9c3ccbb98 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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 }