Skip to content

Commit

Permalink
Fix logs in unstructured client
Browse files Browse the repository at this point in the history
  • Loading branch information
Poor12 authored and k8s-infra-cherrypick-robot committed May 24, 2023
1 parent 116a1b8 commit c9cefc7
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 c9cefc7

Please sign in to comment.