camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nferr...@apache.org
Subject [camel-k] 02/09: fix golint findings for pkg/client
Date Wed, 19 Sep 2018 13:54:27 GMT
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 165589212ebe55820bdff1da6ab781bf0da5158e
Author: lburgazzoli <lburgazzoli@gmail.com>
AuthorDate: Wed Sep 19 11:37:47 2018 +0200

    fix golint findings for pkg/client
---
 pkg/client/cmd/context.go |  3 +--
 pkg/client/cmd/get.go     |  8 ++++----
 pkg/client/cmd/install.go |  5 ++---
 pkg/client/cmd/root.go    | 10 +++++-----
 pkg/client/cmd/run.go     |  8 ++++----
 pkg/client/cmd/version.go |  2 +-
 6 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/pkg/client/cmd/context.go b/pkg/client/cmd/context.go
index 949dab0..7fa66ed 100644
--- a/pkg/client/cmd/context.go
+++ b/pkg/client/cmd/context.go
@@ -21,8 +21,7 @@ import (
 	"github.com/spf13/cobra"
 )
 
-// NewCmdContext --
-func NewCmdContext(rootCmdOptions *RootCmdOptions) *cobra.Command {
+func newCmdContext(rootCmdOptions *RootCmdOptions) *cobra.Command {
 	cmd := cobra.Command{
 		Use:   "context",
 		Short: "Configure an Integration Context",
diff --git a/pkg/client/cmd/get.go b/pkg/client/cmd/get.go
index 7ae35ce..5b68adc 100644
--- a/pkg/client/cmd/get.go
+++ b/pkg/client/cmd/get.go
@@ -28,12 +28,12 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 )
 
-type GetCmdOptions struct {
+type getCmdOptions struct {
 	*RootCmdOptions
 }
 
-func NewCmdGet(rootCmdOptions *RootCmdOptions) *cobra.Command {
-	options := GetCmdOptions{
+func newCmdGet(rootCmdOptions *RootCmdOptions) *cobra.Command {
+	options := getCmdOptions{
 		RootCmdOptions: rootCmdOptions,
 	}
 	cmd := cobra.Command{
@@ -46,7 +46,7 @@ func NewCmdGet(rootCmdOptions *RootCmdOptions) *cobra.Command {
 	return &cmd
 }
 
-func (o *GetCmdOptions) run(cmd *cobra.Command, args []string) error {
+func (o *getCmdOptions) run(cmd *cobra.Command, args []string) error {
 	integrationList := v1alpha1.IntegrationList{
 		TypeMeta: metav1.TypeMeta{
 			APIVersion: v1alpha1.SchemeGroupVersion.String(),
diff --git a/pkg/client/cmd/install.go b/pkg/client/cmd/install.go
index cd84fbd..2ca05ba 100644
--- a/pkg/client/cmd/install.go
+++ b/pkg/client/cmd/install.go
@@ -23,13 +23,12 @@ import (
 	"os"
 
 	"github.com/apache/camel-k/pkg/install"
+	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
-	"github.com/pkg/errors"
 )
 
-// NewCmdInstall --
-func NewCmdInstall(rootCmdOptions *RootCmdOptions) *cobra.Command {
+func newCmdInstall(rootCmdOptions *RootCmdOptions) *cobra.Command {
 	options := installCmdOptions{
 		RootCmdOptions: rootCmdOptions,
 	}
diff --git a/pkg/client/cmd/root.go b/pkg/client/cmd/root.go
index dfbbfd9..7fbeeef 100644
--- a/pkg/client/cmd/root.go
+++ b/pkg/client/cmd/root.go
@@ -73,11 +73,11 @@ func NewKamelCommand(ctx context.Context) (*cobra.Command, error) {
 	}
 
 	cmd.AddCommand(newCmdCompletion(&cmd))
-	cmd.AddCommand(NewCmdVersion())
-	cmd.AddCommand(NewCmdRun(&options))
-	cmd.AddCommand(NewCmdGet(&options))
-	cmd.AddCommand(NewCmdInstall(&options))
-	cmd.AddCommand(NewCmdContext(&options))
+	cmd.AddCommand(newCmdVersion())
+	cmd.AddCommand(newCmdRun(&options))
+	cmd.AddCommand(newCmdGet(&options))
+	cmd.AddCommand(newCmdInstall(&options))
+	cmd.AddCommand(newCmdContext(&options))
 
 	return &cmd, nil
 }
diff --git a/pkg/client/cmd/run.go b/pkg/client/cmd/run.go
index 47e23fe..2275e8b 100644
--- a/pkg/client/cmd/run.go
+++ b/pkg/client/cmd/run.go
@@ -20,13 +20,14 @@ package cmd
 import (
 	"errors"
 	"fmt"
-	"github.com/apache/camel-k/pkg/util/sync"
-	"github.com/sirupsen/logrus"
 	"io/ioutil"
 	"os"
 	"strconv"
 	"strings"
 
+	"github.com/apache/camel-k/pkg/util/sync"
+	"github.com/sirupsen/logrus"
+
 	"io"
 
 	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
@@ -39,8 +40,7 @@ import (
 	"k8s.io/apimachinery/pkg/apis/meta/v1"
 )
 
-// NewCmdRun --
-func NewCmdRun(rootCmdOptions *RootCmdOptions) *cobra.Command {
+func newCmdRun(rootCmdOptions *RootCmdOptions) *cobra.Command {
 	options := runCmdOptions{
 		RootCmdOptions: rootCmdOptions,
 	}
diff --git a/pkg/client/cmd/version.go b/pkg/client/cmd/version.go
index 1424a37..2153107 100644
--- a/pkg/client/cmd/version.go
+++ b/pkg/client/cmd/version.go
@@ -24,7 +24,7 @@ import (
 	"github.com/spf13/cobra"
 )
 
-func NewCmdVersion() *cobra.Command {
+func newCmdVersion() *cobra.Command {
 	return &cobra.Command{
 		Use:   "version",
 		Short: "Display client version",


Mime
View raw message