Skip to content

Commit 02968cb

Browse files
committed
Fix linting
1 parent 23a8191 commit 02968cb

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

cli/users.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ package cli
33
import (
44
"time"
55

6-
"github.com/coder/coder/cli/cliui"
7-
"github.com/coder/coder/codersdk"
86
"github.com/jedib0t/go-pretty/v6/table"
97
"github.com/spf13/cobra"
8+
9+
"github.com/coder/coder/cli/cliui"
10+
"github.com/coder/coder/codersdk"
1011
)
1112

1213
func users() *cobra.Command {

cli/userstatus_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func TestUserStatus(t *testing.T) {
2020
otherUser, err := other.User(context.Background(), codersdk.Me)
2121
require.NoError(t, err, "fetch user")
2222

23+
//nolint:paralleltest
2324
t.Run("StatusSelf", func(t *testing.T) {
2425
cmd, root := clitest.New(t, "users", "status", "suspend", "me")
2526
clitest.SetupConfig(t, client, root)
@@ -31,6 +32,7 @@ func TestUserStatus(t *testing.T) {
3132
require.ErrorContains(t, err, "cannot suspend yourself")
3233
})
3334

35+
//nolint:paralleltest
3436
t.Run("StatusOther", func(t *testing.T) {
3537
require.Equal(t, otherUser.Status, codersdk.UserStatusActive, "start as active")
3638

codersdk/users.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,15 +344,11 @@ func (c *Client) Logout(ctx context.Context) error {
344344
// User returns a user for the ID provided.
345345
// If the uuid is nil, the current user will be returned.
346346
func (c *Client) User(ctx context.Context, id uuid.UUID) (User, error) {
347-
return c.userByIdentifier(ctx, uuidOrMe(id))
347+
return c.UserByIdentifier(ctx, uuidOrMe(id))
348348
}
349349

350350
// UserByIdentifier returns a user for the username or uuid provided.
351-
func (c *Client) UserByIdentifier(ctx context.Context, username string) (User, error) {
352-
return c.userByIdentifier(ctx, username)
353-
}
354-
355-
func (c *Client) userByIdentifier(ctx context.Context, ident string) (User, error) {
351+
func (c *Client) UserByIdentifier(ctx context.Context, ident string) (User, error) {
356352
res, err := c.request(ctx, http.MethodGet, fmt.Sprintf("/api/v2/users/%s", ident), nil)
357353
if err != nil {
358354
return User{}, err

0 commit comments

Comments
 (0)