This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 8c284c2a397272a82c7c0be7503b4d9c5627a60c Author: lburgazzoli <[email protected]> AuthorDate: Fri Apr 17 17:56:56 2020 +0200 chore: fix lint findings --- pkg/install/optional.go | 18 ++++++++++++++++++ pkg/util/source/inspector.go | 5 ++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pkg/install/optional.go b/pkg/install/optional.go index f3fe873..185ac78 100644 --- a/pkg/install/optional.go +++ b/pkg/install/optional.go @@ -1,7 +1,25 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package install import ( "context" + "github.com/apache/camel-k/pkg/client" "github.com/go-logr/logr" ) diff --git a/pkg/util/source/inspector.go b/pkg/util/source/inspector.go index 20ce323..25347d3 100644 --- a/pkg/util/source/inspector.go +++ b/pkg/util/source/inspector.go @@ -200,12 +200,11 @@ func (i baseInspector) Extract(v1.SourceSpec, *Metadata) error { } // discoverDependencies returns a list of dependencies required by the given source code -func (i *baseInspector) discoverCapabilities(source v1.SourceSpec, meta *Metadata) { +func (i *baseInspector) discoverCapabilities(_ v1.SourceSpec, meta *Metadata) { uris := util.StringSliceJoin(meta.FromURIs, meta.ToURIs) for _, uri := range uris { - switch i.getURIPrefix(uri) { - case "platform-http": + if i.getURIPrefix(uri) == "platform-http" { meta.RequiredCapabilities.Add(v1.CapabilityPlatformHTTP) } }
