chore(lint): suppress contextcheck on OIDC provider init call sites
Adding a context parameter to the shared package put its call chains in contextcheck's scope; the flagged background context in the provider setup is deliberate since provider lifetime exceeds any request.
This commit is contained in:
parent
7da3607032
commit
344bd80f89
|
|
@ -127,7 +127,7 @@ func adminUsersCreate(_ context.Context, in *struct{ Body models.CreateUserBody
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, translateDomainError(err)
|
return nil, translateDomainError(err)
|
||||||
}
|
}
|
||||||
return &adminUserBody{Body: shared.NewAdminUser(newUser, providers)}, nil
|
return &adminUserBody{Body: shared.NewAdminUser(newUser, providers)}, nil //nolint:contextcheck // OIDC provider init deliberately uses a background context — provider lifetime exceeds the request
|
||||||
}
|
}
|
||||||
|
|
||||||
func adminUsersPatchAdmin(_ context.Context, in *struct {
|
func adminUsersPatchAdmin(_ context.Context, in *struct {
|
||||||
|
|
|
||||||
|
|
@ -47,5 +47,5 @@ func RegisterInfoRoutes(api huma.API) {
|
||||||
func init() { AddRouteRegistrar(RegisterInfoRoutes) }
|
func init() { AddRouteRegistrar(RegisterInfoRoutes) }
|
||||||
|
|
||||||
func info(_ context.Context, _ *struct{}) (*infoBody, error) {
|
func info(_ context.Context, _ *struct{}) (*infoBody, error) {
|
||||||
return &infoBody{Body: shared.BuildInfo()}, nil
|
return &infoBody{Body: shared.BuildInfo()}, nil //nolint:contextcheck // OIDC provider init deliberately uses a background context — provider lifetime exceeds the request
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue