Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02968cb

Browse files
committed
Fix linting
1 parent23a8191 commit02968cb

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
funcusers()*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-
returnc.userByIdentifier(ctx,uuidOrMe(id))
347+
returnc.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,usernamestring) (User,error) {
352-
returnc.userByIdentifier(ctx,username)
353-
}
354-
355-
func (c*Client)userByIdentifier(ctx context.Context,identstring) (User,error) {
351+
func (c*Client)UserByIdentifier(ctx context.Context,identstring) (User,error) {
356352
res,err:=c.request(ctx,http.MethodGet,fmt.Sprintf("/api/v2/users/%s",ident),nil)
357353
iferr!=nil {
358354
returnUser{},err

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp