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

Commit33c0bc4

Browse files
committed
linting
1 parent406faba commit33c0bc4

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

‎coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8409,7 +8409,7 @@ func (q *FakeQuerier) ListWorkspaceAgentPortShares(_ context.Context, workspaceI
84098409
returnshares,nil
84108410
}
84118411

8412-
func (q*FakeQuerier)OIDCClaimFields(ctx context.Context,organizationID uuid.UUID) ([]string,error) {
8412+
func (q*FakeQuerier)OIDCClaimFields(_ context.Context,organizationID uuid.UUID) ([]string,error) {
84138413
orgMembers:=q.getOrganizationMemberNoLock(organizationID)
84148414

84158415
varfields []string

‎coderd/database/oidcclaims_test.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,7 @@ type userGenerator struct {
137137
}
138138

139139
func (guserGenerator)noLink(lt database.LoginType) database.User {
140-
returng.user(lt,false,nil)
141-
}
142-
143-
func (guserGenerator)withLink(lt database.LoginType,rawJSON json.RawMessage) database.User {
144-
returng.user(lt,true,rawJSON)
145-
}
146140

147-
func (guserGenerator)user(lt database.LoginType,createLinkbool,rawJSON json.RawMessage) database.User {
148141
t:=g.t
149142
db:=g.db
150143

@@ -153,13 +146,17 @@ func (g userGenerator) user(lt database.LoginType, createLink bool, rawJSON json
153146
u:=dbgen.User(t,db, database.User{
154147
LoginType:lt,
155148
})
149+
returnu
150+
}
156151

157-
if!createLink {
158-
returnu
159-
}
152+
func (guserGenerator)withLink(lt database.LoginType,rawJSON json.RawMessage) database.User {
153+
t:=g.t
154+
db:=g.db
155+
156+
user:=g.noLink(lt)
160157

161158
link:=dbgen.UserLink(t,db, database.UserLink{
162-
UserID:u.ID,
159+
UserID:user.ID,
163160
LoginType:lt,
164161
})
165162

@@ -188,7 +185,7 @@ func (g userGenerator) user(lt database.LoginType, createLink bool, rawJSON json
188185
require.NoError(t,err)
189186
}
190187

191-
returnu
188+
returnuser
192189
}
193190

194191
typerawUpdaterinterface {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp