This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch govet-fix
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit af80f493c55b2ed37750e341add9620fdfd9c271
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Wed Nov 28 17:53:57 2018 +0100

    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 7f5e52b..1a9a9c4 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 3a1f05c..eb5789b 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 73d865e..18473fb 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
 }

Reply via email to