mirror of
https://github.com/ergochat/ergo.git
synced 2025-01-24 11:14:10 +01:00
parent
374cf8ef97
commit
db0910d82d
@ -29,7 +29,7 @@ func (u *UUID) UnmarshalJSON(b []byte) (err error) {
|
|||||||
return ErrInvalidUUID
|
return ErrInvalidUUID
|
||||||
}
|
}
|
||||||
readLen, err := base64.RawURLEncoding.Decode(u[:], b[1:23])
|
readLen, err := base64.RawURLEncoding.Decode(u[:], b[1:23])
|
||||||
if readLen != 16 {
|
if err != nil || readLen != 16 {
|
||||||
return ErrInvalidUUID
|
return ErrInvalidUUID
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user