mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore(cli): rename Cmd to Command (#12616)
I think Command is cleaner and my original decision to use "Cmd" a mistake. Plus this creates better parity with cobra.
This commit is contained in:
+4
-4
@@ -13,14 +13,14 @@ import (
|
||||
"github.com/coder/serpent"
|
||||
)
|
||||
|
||||
func (r *RootCmd) userList() *serpent.Cmd {
|
||||
func (r *RootCmd) userList() *serpent.Command {
|
||||
formatter := cliui.NewOutputFormatter(
|
||||
cliui.TableFormat([]codersdk.User{}, []string{"username", "email", "created_at", "status"}),
|
||||
cliui.JSONFormat(),
|
||||
)
|
||||
client := new(codersdk.Client)
|
||||
|
||||
cmd := &serpent.Cmd{
|
||||
cmd := &serpent.Command{
|
||||
Use: "list",
|
||||
Aliases: []string{"ls"},
|
||||
Middleware: serpent.Chain(
|
||||
@@ -47,14 +47,14 @@ func (r *RootCmd) userList() *serpent.Cmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (r *RootCmd) userSingle() *serpent.Cmd {
|
||||
func (r *RootCmd) userSingle() *serpent.Command {
|
||||
formatter := cliui.NewOutputFormatter(
|
||||
&userShowFormat{},
|
||||
cliui.JSONFormat(),
|
||||
)
|
||||
client := new(codersdk.Client)
|
||||
|
||||
cmd := &serpent.Cmd{
|
||||
cmd := &serpent.Command{
|
||||
Use: "show <username|user_id|'me'>",
|
||||
Short: "Show a single user. Use 'me' to indicate the currently authenticated user.",
|
||||
Long: formatExamples(
|
||||
|
||||
Reference in New Issue
Block a user