[#144] sdk/token: Use MarshalBinary to uuid of session token

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-09-16 15:19:43 +03:00 committed by Stanislav Bogatyrev
parent 5fa271e141
commit 2a7e91fa13

View file

@ -31,5 +31,10 @@ func (s SessionToken) SessionKey() []byte {
} }
func (s SessionToken) ID() []byte { func (s SessionToken) ID() []byte {
return s.id[:] data, err := s.id.MarshalBinary()
if err != nil {
panic(err) // must never panic
}
return data
} }