From af80f493c55b2ed37750e341add9620fdfd9c271 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Wed, 28 Nov 2018 17:53:57 +0100 Subject: [PATCH] Fixing some govet findings --- pkg/apis/camel/v1alpha1/types_support.go | 3 +-- pkg/client/cmd/run.go | 2 -- pkg/util/watch/watch.go | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/apis/camel/v1alpha1/types_support.go b/pkg/apis/camel/v1alpha1/types_support.go index 7f5e52b69d..1a9a9c452b 100644 --- a/pkg/apis/camel/v1alpha1/types_support.go +++ b/pkg/apis/camel/v1alpha1/types_support.go @@ -98,7 +98,6 @@ func NewIntegrationContextList() IntegrationContextList { } } - // TraitProfileByName returns the trait profile corresponding to the given name (case insensitive) func TraitProfileByName(name string) TraitProfile { for _, p := range allTraitProfiles { @@ -107,4 +106,4 @@ func TraitProfileByName(name string) TraitProfile { } } return "" -} \ No newline at end of file +} diff --git a/pkg/client/cmd/run.go b/pkg/client/cmd/run.go index 3a1f05c27c..eb5789b323 100644 --- a/pkg/client/cmd/run.go +++ b/pkg/client/cmd/run.go @@ -394,12 +394,10 @@ func toJSON(value runtime.Object) ([]byte, error) { u, err := k8sutil.UnstructuredFromRuntimeObject(value) if err != nil { return nil, fmt.Errorf("error creating unstructured data: %v", err) - return nil, err } data, err := runtime.Encode(unstructured.UnstructuredJSONScheme, u) if err != nil { return nil, fmt.Errorf("error marshalling to json: %v", err) - return nil, err } return data, nil } diff --git a/pkg/util/watch/watch.go b/pkg/util/watch/watch.go index 73d865ed0c..18473fb55e 100644 --- a/pkg/util/watch/watch.go +++ b/pkg/util/watch/watch.go @@ -145,6 +145,4 @@ func HandleStateChanges(ctx context.Context, integration *v1alpha1.Integration, } } } - - return nil }