Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via
`NewXHeader`. Assert the values in corresponding
unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `XHeader.ToV2` method return `nil`
when called on `nil`. Document that `NewXHeaderFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via
`NewVersion`. Assert the values in corresponding
unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Version.ToV2` method return `nil`
when called on `nil`. Document that `NewVersionFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via
`NewSignature`. Assert the values in corresponding
unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Signature.ToV2` method return `nil`
when called on `nil`. Document that `NewSignatureFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewChecksum`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Checksum.ToV2` method return `nil`
when called on `nil`. Document that `NewChecksumFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `BearerToken.ToV2` method return `nil`
when called on `nil`. Write corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `StorageGroup.ToV2` method return `nil`
when called on `nil`. Document that `NewFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewToken`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Token.ToV2` method return `nil`
when called on `nil`. Document that `NewTokenFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
`NewTrust`, `NewPeerToPeerTrust` and `NewGlobalTrust`
Document field values of instance constructed via
`NewTrust`, `NewPeerToPeerTrust` and `NewGlobalTrust`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
`PeerToPeerTrust` and `GlobalTrust` to nil message
Document that `Trust.ToV2`, `PeerToPeerTrust.ToV2`
and `GlobalTrust.ToV2` methods return `nil`when
called on `nil`. Document that `TrustFromV2`,
`PeerToPeerTrustFromV2`and `GlobalTrustFromV2`
functions return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewPeerID`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `PeerID.ToV2` method return `nil`
when called on `nil`. Document that `PeerIDFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
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>
Document that `SplitID.ToV2` method return `nil`
when called on `nil`. Document that `NewSplitIDFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewTombstone`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `NewTombstoneFromV2` function return
`nil` when called on `nil`. Write corresponding
unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewSplitInfo`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `SplitInfo.ToV2` method return `nil`
when called on `nil`. Document that `NewSplitInfoFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewRange`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Range.ToV2` method return `nil`
when called on `nil`. Document that `NewRangeFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
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>
Document field values of instance constructed via `NewAttribute`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Attribute.ToV2` method return `nil`
when called on `nil`. Document that `NewAttributeFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewAddress`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Address.ToV2` method return `nil`
when called on `nil`. Document that `NewAddressFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewSelector`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Selector.ToV2` method return `nil`
when called on `nil`. Document that `NewSelectorFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewReplica`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `Replica.ToV2` method return `nil`
when called on `nil`. Document that `ReplicaFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewPlacementPolicy`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `PlacementPolicy.ToV2` method return `nil`
when called on `nil`. Document that `PlacementPolicyFromV2`
function return `nil` when called on `nil`. Write corresponding
unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewNodeInfo` and `NewNodeAttribute`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `NodeAttribute.ToV2` and `NodeInfo.ToV2`
method return `nil` when called on `nil`. Document that
`NodeAttributeFromV2` and `NodeInfoFromV2` functions
return `nil` when called on `nil`. Write corresponding
unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document field values of instance constructed via `NewNetworkInfo`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>