Skip to content

Commit f57008c

Browse files
committed
Add comment to displayUsers
1 parent 77f4890 commit f57008c

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

cli/userlist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func userList() *cobra.Command {
2525
return err
2626
}
2727

28-
_, err = fmt.Fprintln(cmd.OutOrStdout(), DisplayUsers(columns, users...))
28+
_, err = fmt.Fprintln(cmd.OutOrStdout(), displayUsers(columns, users...))
2929
return err
3030
},
3131
}

cli/users.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ func users() *cobra.Command {
2222
return cmd
2323
}
2424

25-
// DisplayUsers will return a table displaying all users passed in.
25+
// displayUsers will return a table displaying all users passed in.
2626
// filterColumns must be a subset of the user fields and will determine which
2727
// columns to display
28-
func DisplayUsers(filterColumns []string, users ...codersdk.User) string {
28+
func displayUsers(filterColumns []string, users ...codersdk.User) string {
2929
tableWriter := cliui.Table()
3030
header := table.Row{"ID", "Username", "Email", "Created At", "Status"}
3131
tableWriter.AppendHeader(header)

cli/userstatus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func setUserStatus(sdkStatus codersdk.UserStatus) *cobra.Command {
6363
}
6464

6565
// Display the user
66-
_, _ = fmt.Fprintln(cmd.OutOrStdout(), DisplayUsers(columns, user))
66+
_, _ = fmt.Fprintln(cmd.OutOrStdout(), displayUsers(columns, user))
6767

6868
// User status is already set to this
6969
if user.Status == sdkStatus {

cli/userstatus_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import (
55
"context"
66
"testing"
77

8-
"github.com/coder/coder/codersdk"
9-
108
"github.com/stretchr/testify/require"
119

1210
"github.com/coder/coder/cli/clitest"
1311
"github.com/coder/coder/coderd/coderdtest"
12+
"github.com/coder/coder/codersdk"
1413
)
1514

1615
func TestUserStatus(t *testing.T) {

codersdk/users.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import (
77
"net/http"
88
"time"
99

10-
"golang.org/x/xerrors"
11-
1210
"github.com/google/uuid"
11+
"golang.org/x/xerrors"
1312
)
1413

1514
// Me is used as a replacement for your own ID.

0 commit comments

Comments
 (0)