Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Labarussias <issif+github@gadz.org>
  • Loading branch information
Issif committed Feb 15, 2024
1 parent bc0e7b6 commit 76c3ddf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/kubernetes/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (client Client) GetReplicasetFromPod(pod *corev1.Pod) (*appsv1.ReplicaSet,
func (client Client) GetTarget(resource, name, namespace string) (interface{}, error) {
switch resource {
case "namespaces":
return client.GetNamespace(name, namespace)
return client.GetNamespace(name)
case "configmaps":
return client.GetConfigMap(name, namespace)
case "secrets":
Expand All @@ -177,10 +177,10 @@ func (client Client) GetTarget(resource, name, namespace string) (interface{}, e
return nil, errors.New("the resource doesn't exist or its type is not yet managed")
}

func (client Client) GetNamespace(name, namespace string) (*corev1.Namespace, error) {
func (client Client) GetNamespace(name string) (*corev1.Namespace, error) {
p, err := client.Clientset.CoreV1().Namespaces().Get(context.Background(), name, metav1.GetOptions{})
if err != nil {
return nil, fmt.Errorf("the namespace '%v' doesn't exist", name, namespace)
return nil, fmt.Errorf("the namespace '%v' doesn't exist", name)
}
return p, nil
}
Expand Down

0 comments on commit 76c3ddf

Please sign in to comment.