Skip to content

Commit

Permalink
added the GVK to the output
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hernandez <[email protected]>
  • Loading branch information
christianh814 committed Jan 20, 2023
1 parent e8a60ca commit 26f79b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cli/whoami/whoami.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func (o *WhoAmIOptions) Run() error {
return nil
case o.Output == "yaml":
u, err := o.UserInterface.Users().Get(context.TODO(), "~", metav1.GetOptions{})
u.SetGroupVersionKind(userv1.GroupVersion.WithKind("User"))
if err != nil {
return err
}
Expand All @@ -178,6 +179,7 @@ func (o *WhoAmIOptions) Run() error {
return nil
case o.Output == "json":
u, err := o.UserInterface.Users().Get(context.TODO(), "~", metav1.GetOptions{})
u.SetGroupVersionKind(userv1.GroupVersion.WithKind("User"))
if err != nil {
return err
}
Expand Down

0 comments on commit 26f79b8

Please sign in to comment.