chore: replace interface with any

This commit is contained in:
Florian Schade
2026-04-23 09:31:11 +02:00
committed by Ralf Haferkamp
parent 8f26149743
commit 288e67cc39
138 changed files with 933 additions and 934 deletions
+3 -3
View File
@@ -9,13 +9,13 @@ type contextKey struct{}
type newSessionFlagKey struct{}
// NewContext makes a new context that contains the OpenID connect claims in a map.
func NewContext(parent context.Context, c map[string]interface{}) context.Context {
func NewContext(parent context.Context, c map[string]any) context.Context {
return context.WithValue(parent, contextKey{}, c)
}
// FromContext returns the claims map stored in a context, or nil if there isn't one.
func FromContext(ctx context.Context) map[string]interface{} {
s, _ := ctx.Value(contextKey{}).(map[string]interface{})
func FromContext(ctx context.Context) map[string]any {
s, _ := ctx.Value(contextKey{}).(map[string]any)
return s
}