pkg/oidc: Replace interface{} with any

Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
This commit is contained in:
Thomas Hipp 2023-09-26 19:54:48 +02:00
parent 4e6033896d
commit 868cf39632
No known key found for this signature in database
GPG key ID: 36F3DB891755E09B
8 changed files with 22 additions and 22 deletions

View file

@ -17,13 +17,13 @@ import (
type Audience []string
func (a *Audience) UnmarshalJSON(text []byte) error {
var i interface{}
var i any
err := json.Unmarshal(text, &i)
if err != nil {
return err
}
switch aud := i.(type) {
case []interface{}:
case []any:
*a = make([]string, len(aud))
for i, audience := range aud {
(*a)[i] = audience.(string)
@ -177,7 +177,7 @@ func (s *SpaceDelimitedArray) UnmarshalJSON(data []byte) error {
return nil
}
func (s *SpaceDelimitedArray) Scan(src interface{}) error {
func (s *SpaceDelimitedArray) Scan(src any) error {
if src == nil {
*s = nil
return nil