mirror of https://github.com/golang-jwt/jwt.git
Fixed linting errors
This commit is contained in:
parent
dc52415cf7
commit
066f850043
|
@ -56,23 +56,23 @@ func (m MapClaims) ParseNumericDate(key string) *NumericDate {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m MapClaims) ParseClaimsString(key string) ClaimStrings {
|
func (m MapClaims) ParseClaimsString(key string) ClaimStrings {
|
||||||
var aud []string
|
var cs []string
|
||||||
switch v := m[key].(type) {
|
switch v := m[key].(type) {
|
||||||
case string:
|
case string:
|
||||||
aud = append(aud, v)
|
cs = append(cs, v)
|
||||||
case []string:
|
case []string:
|
||||||
aud = v
|
cs = v
|
||||||
case []interface{}:
|
case []interface{}:
|
||||||
for _, a := range v {
|
for _, a := range v {
|
||||||
vs, ok := a.(string)
|
vs, ok := a.(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
aud = append(aud, vs)
|
cs = append(cs, vs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return cs
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m MapClaims) ParseString(key string) string {
|
func (m MapClaims) ParseString(key string) string {
|
||||||
|
|
Loading…
Reference in New Issue