Skip to content

Commit

Permalink
Merge pull request #2343 from Poor12/fix-logs
Browse files Browse the repository at this point in the history
✨Fix logs in unstructured client
  • Loading branch information
k8s-ci-robot committed May 24, 2023
2 parents 589f3fa + 29eb0cf commit 73949d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/client/unstructured_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ func (uc *unstructuredClient) List(ctx context.Context, obj ObjectList, opts ...

func (uc *unstructuredClient) GetSubResource(ctx context.Context, obj, subResourceObj Object, subResource string, opts ...SubResourceGetOption) error {
if _, ok := obj.(runtime.Unstructured); !ok {
return fmt.Errorf("unstructured client did not understand object: %T", subResource)
return fmt.Errorf("unstructured client did not understand object: %T", obj)
}

if _, ok := subResourceObj.(runtime.Unstructured); !ok {
return fmt.Errorf("unstructured client did not understand object: %T", obj)
return fmt.Errorf("unstructured client did not understand object: %T", subResourceObj)
}

if subResourceObj.GetName() == "" {
Expand All @@ -255,11 +255,11 @@ func (uc *unstructuredClient) GetSubResource(ctx context.Context, obj, subResour

func (uc *unstructuredClient) CreateSubResource(ctx context.Context, obj, subResourceObj Object, subResource string, opts ...SubResourceCreateOption) error {
if _, ok := obj.(runtime.Unstructured); !ok {
return fmt.Errorf("unstructured client did not understand object: %T", subResourceObj)
return fmt.Errorf("unstructured client did not understand object: %T", obj)
}

if _, ok := subResourceObj.(runtime.Unstructured); !ok {
return fmt.Errorf("unstructured client did not understand object: %T", obj)
return fmt.Errorf("unstructured client did not understand object: %T", subResourceObj)
}

if subResourceObj.GetName() == "" {
Expand Down

0 comments on commit 73949d0

Please sign in to comment.