We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0da6fc3 commit c280ec7Copy full SHA for c280ec7
audience.go
@@ -19,7 +19,6 @@ func (a Audience) MarshalJSON() ([]byte, error) {
19
}
20
21
// UnmarshalJSON implements an unmarshaling function for "aud" claim.
22
-// TODO(gbrlsnchs): create tests for this method.
23
func (a *Audience) UnmarshalJSON(b []byte) error {
24
var (
25
v interface{}
@@ -34,7 +33,7 @@ func (a *Audience) UnmarshalJSON(b []byte) error {
34
33
aud[0] = vv
35
*a = aud
36
case []interface{}:
37
- aud := make(Audience, 0, len(vv))
+ aud := make(Audience, len(vv))
38
for i := range vv {
39
aud[i] = vv[i].(string)
40
0 commit comments