mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 13:37:57 +08:00
Fix nolint directive format to match codebase style
Remove explanatory text after //nolint:goconst directives to be consistent with the rest of the codebase. The codebase pattern is to use just //nolint:goconst without additional comments. This matches the style used in controller_test.go and other test files throughout the project. Co-authored-by: rchincha <45800463+rchincha@users.noreply.github.com>
This commit is contained in:
@@ -140,7 +140,7 @@ func (a *OIDCBearerAuthorizer) verifyAudience(token *oidc.IDToken) bool {
|
||||
// extractUsername extracts the username from token claims based on claim mapping configuration.
|
||||
func (a *OIDCBearerAuthorizer) extractUsername(claims map[string]any) string {
|
||||
// Default claim to use for username
|
||||
claimName := "sub" //nolint:goconst // "sub" is the standard OIDC claim name
|
||||
claimName := "sub" //nolint:goconst
|
||||
|
||||
// Use configured claim mapping if available
|
||||
if a.claimMapping != nil && a.claimMapping.Username != "" {
|
||||
|
||||
@@ -161,7 +161,7 @@ func TestOIDCBearerAuthorizer(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("Valid token with default claims", func() {
|
||||
subject := "test-user" //nolint:goconst // test data
|
||||
subject := "test-user" //nolint:goconst
|
||||
token, err := createTestOIDCToken(privKey, issuer, audience, subject, nil)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user