Document field values of instance constructed via `NewID`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `ID.ToV2` method return `nil`
when called on `nil`. Document that `NewIDFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Remove nil if-statement from IDFromV2 function to which avoids checking the
correctness of the identifier format. From now IDFromV2 returns format error
on nil argument.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>