Merge pull request #2283 from kvanzuijlen/golint

Updated linters
This commit is contained in:
Joel Speed
2023-10-25 11:36:44 +01:00
committed by GitHub
9 changed files with 18 additions and 22 deletions
+4 -4
View File
@@ -7,18 +7,18 @@ import (
type NoOpLock struct{}
func (l *NoOpLock) Obtain(ctx context.Context, expiration time.Duration) error {
func (l *NoOpLock) Obtain(_ context.Context, _ time.Duration) error {
return nil
}
func (l *NoOpLock) Peek(ctx context.Context) (bool, error) {
func (l *NoOpLock) Peek(_ context.Context) (bool, error) {
return false, nil
}
func (l *NoOpLock) Refresh(ctx context.Context, expiration time.Duration) error {
func (l *NoOpLock) Refresh(_ context.Context, _ time.Duration) error {
return nil
}
func (l *NoOpLock) Release(ctx context.Context) error {
func (l *NoOpLock) Release(_ context.Context) error {
return nil
}
+1 -1
View File
@@ -199,7 +199,7 @@ type testVerifier struct {
jwk jose.JSONWebKey
}
func (t *testVerifier) VerifySignature(ctx context.Context, jwt string) ([]byte, error) {
func (t *testVerifier) VerifySignature(_ context.Context, jwt string) ([]byte, error) {
jws, err := jose.ParseSigned(jwt)
if err != nil {
return nil, fmt.Errorf("oidc: malformed jwt: %v", err)
+4 -4
View File
@@ -12,19 +12,19 @@ type MockLock struct {
elapsed time.Duration
}
func (l *MockLock) Obtain(ctx context.Context, expiration time.Duration) error {
func (l *MockLock) Obtain(_ context.Context, expiration time.Duration) error {
l.expiration = expiration
return nil
}
func (l *MockLock) Peek(ctx context.Context) (bool, error) {
func (l *MockLock) Peek(_ context.Context) (bool, error) {
if l.elapsed < l.expiration {
return true, nil
}
return false, nil
}
func (l *MockLock) Refresh(ctx context.Context, expiration time.Duration) error {
func (l *MockLock) Refresh(_ context.Context, expiration time.Duration) error {
if l.expiration <= l.elapsed {
return sessions.ErrNotLocked
}
@@ -33,7 +33,7 @@ func (l *MockLock) Refresh(ctx context.Context, expiration time.Duration) error
return nil
}
func (l *MockLock) Release(ctx context.Context) error {
func (l *MockLock) Release(_ context.Context) error {
if l.expiration <= l.elapsed {
return sessions.ErrNotLocked
}
+1 -1
View File
@@ -38,7 +38,7 @@ func validateHeader(header options.Header, names map[string]struct{}) []string {
return msgs
}
func validateHeaderValue(name string, value options.HeaderValue) []string {
func validateHeaderValue(_ string, value options.HeaderValue) []string {
switch {
case value.SecretSource != nil && value.ClaimSource == nil:
return []string{validateSecretSource(*value.SecretSource)}