mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
feat: add JSON output format to many CLI commands (#6082)
This commit is contained in:
@ -58,7 +58,9 @@ func createUserStatusCommand(sdkStatus codersdk.UserStatus) *cobra.Command {
|
||||
return xerrors.Errorf("fetch user: %w", err)
|
||||
}
|
||||
|
||||
// Display the user
|
||||
// Display the user. This uses cliui.DisplayTable directly instead
|
||||
// of cliui.NewOutputFormatter because we prompt immediately
|
||||
// afterwards.
|
||||
table, err := cliui.DisplayTable([]codersdk.User{user}, "", columns)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("render user table: %w", err)
|
||||
|
Reference in New Issue
Block a user