mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-19 06:31:47 +00:00
Enable 'makezero' and 'prealloc' linters, and require 'any' instead of 'interface{}'
Enforce importas: - go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1 - go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Package authncache implements a cache of active authenticators.
|
||||
@@ -65,7 +65,7 @@ func (c *Cache) Delete(key Key) {
|
||||
// Keys currently stored in the cache.
|
||||
func (c *Cache) Keys() []Key {
|
||||
var result []Key
|
||||
c.cache.Range(func(key, _ interface{}) bool {
|
||||
c.cache.Range(func(key, _ any) bool {
|
||||
result = append(result, key.(Key))
|
||||
return true
|
||||
})
|
||||
|
||||
@@ -184,7 +184,7 @@ func TestAuthenticateTokenCredentialRequest(t *testing.T) {
|
||||
|
||||
type audienceFreeContext struct{}
|
||||
|
||||
func (audienceFreeContext) Matches(in interface{}) bool {
|
||||
func (audienceFreeContext) Matches(in any) bool {
|
||||
ctx, isCtx := in.(context.Context)
|
||||
if !isCtx {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user