diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2357de6..00ec000 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,48 +1,13 @@ - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + + + + - - - - - - - - @@ -582,7 +547,6 @@ true @@ -621,10 +586,19 @@ - + + + + + + + + + + diff --git a/cmd/config/config.go b/cmd/config/config.go index edd17bf..c22fb36 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -138,7 +138,7 @@ func (o *ConfigOptions) Run(ctx context.Context) error { if err != nil { return err } - if list == nil || len(list) == 0 { + if len(list) == 0 { utils.Println("No Kubemq clusters were found for selection") } else { clusterSelected := "" diff --git a/cmd/create/connector/connector.go b/cmd/create/connector/connector.go index 8f852a4..f5e3032 100644 --- a/cmd/create/connector/connector.go +++ b/cmd/create/connector/connector.go @@ -9,7 +9,6 @@ import ( operatorTypes "github.com/kubemq-io/kubemqctl/pkg/k8s/types/operator" "github.com/kubemq-io/kubemqctl/pkg/utils" "github.com/spf13/cobra" - "reflect" ) type CreateOptions struct { @@ -122,7 +121,3 @@ func (o *CreateOptions) Run(ctx context.Context) error { return nil } - -func isDefault(a, b interface{}) bool { - return reflect.DeepEqual(a, b) -} diff --git a/cmd/create/connector/deploy.go b/cmd/create/connector/deploy.go index 8fa28ea..c19799d 100644 --- a/cmd/create/connector/deploy.go +++ b/cmd/create/connector/deploy.go @@ -65,7 +65,7 @@ func (o *deployOptions) complete() error { Message: "Choose Connector type:", Options: []string{"targets", "sources", "bridges"}, } - survey.AskOne(prompt, &o.connectorType) + _ = survey.AskOne(prompt, &o.connectorType) } if o.configFile != "" { data, err := ioutil.ReadFile(o.configFile) @@ -79,7 +79,7 @@ func (o *deployOptions) complete() error { Message: "Config file", FileName: "*.yaml", } - survey.AskOne(prompt, &o.configData) + _ = survey.AskOne(prompt, &o.configData) } return nil } diff --git a/pkg/k8s/client/pod.go b/pkg/k8s/client/pod.go index ff94630..0b534fb 100644 --- a/pkg/k8s/client/pod.go +++ b/pkg/k8s/client/pod.go @@ -14,7 +14,7 @@ func PodStatus(p *v1.Pod) string { if len(p.Status.ContainerStatuses) > 0 { cs := p.Status.ContainerStatuses[0] if cs.State.Running != nil { - fields["Current Status"] = fmt.Sprintf("Running") + fields["Current Status"] = "Running" } if cs.State.Waiting != nil { fields["Current Status"] = fmt.Sprintf("Waiting (%s)", cs.State.Waiting.Reason) diff --git a/pkg/k8s/types/kubemqcluster/deepcopy.go b/pkg/k8s/types/kubemqcluster/deepcopy.go index fcccc90..2bec6b2 100644 --- a/pkg/k8s/types/kubemqcluster/deepcopy.go +++ b/pkg/k8s/types/kubemqcluster/deepcopy.go @@ -11,7 +11,7 @@ func (in *KubemqCluster) DeepCopyInto(out *KubemqCluster) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) - return + } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemqCluster. @@ -44,7 +44,7 @@ func (in *KubemqClusterList) DeepCopyInto(out *KubemqClusterList) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - return + } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemqClusterList. @@ -149,7 +149,7 @@ func (in *KubemqClusterSpec) DeepCopyInto(out *KubemqClusterSpec) { in, out := &in.Queue, &out.Queue *out = (*in).DeepCopy() } - return + } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemqClusterSpec. @@ -170,7 +170,7 @@ func (in *KubemqClusterStatus) DeepCopyInto(out *KubemqClusterStatus) { *out = new(int32) **out = **in } - return + } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubemqClusterStatus.