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

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

commit 7501383a711e9a5d5dcaa562a03fe52ed68998d5
Author: lburgazzoli <[email protected]>
AuthorDate: Wed Sep 19 12:10:19 2018 +0200

    fix golint findings for pkg/util/watch
---
 pkg/client/cmd/run.go   |  2 +-
 pkg/util/watch/watch.go | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/pkg/client/cmd/run.go b/pkg/client/cmd/run.go
index 2275e8b..37d06bb 100644
--- a/pkg/client/cmd/run.go
+++ b/pkg/client/cmd/run.go
@@ -134,7 +134,7 @@ func (o *runCmdOptions) run(cmd *cobra.Command, args 
[]string) error {
 
 func (o *runCmdOptions) waitForIntegrationReady(integration 
*v1alpha1.Integration) error {
        // Block this goroutine until the integration is in a final status
-       changes, err := watch.WatchStateChanges(o.Context, integration)
+       changes, err := watch.StateChanges(o.Context, integration)
        if err != nil {
                return err
        }
diff --git a/pkg/util/watch/watch.go b/pkg/util/watch/watch.go
index 3ec0bda..1ed9671 100644
--- a/pkg/util/watch/watch.go
+++ b/pkg/util/watch/watch.go
@@ -18,18 +18,19 @@ limitations under the License.
 package watch
 
 import (
-       "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
        "context"
+
+       "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
        "github.com/operator-framework/operator-sdk/pkg/k8sclient"
-       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-       "k8s.io/apimachinery/pkg/runtime"
        "github.com/operator-framework/operator-sdk/pkg/util/k8sutil"
-       "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
        "github.com/sirupsen/logrus"
+       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+       "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+       "k8s.io/apimachinery/pkg/runtime"
 )
 
-// Watches a integration resource and send it through a channel when its 
status changes
-func WatchStateChanges(ctx context.Context, integration *v1alpha1.Integration) 
(<-chan *v1alpha1.Integration, error) {
+// StateChanges watches a integration resource and send it through a channel 
when its status changes
+func StateChanges(ctx context.Context, integration *v1alpha1.Integration) 
(<-chan *v1alpha1.Integration, error) {
        resourceClient, _, err := 
k8sclient.GetResourceClient(integration.APIVersion, integration.Kind, 
integration.Namespace)
        if err != nil {
                return nil, err

Reply via email to