[#302] pkg/object: Document default values set in NewSplitInfo

Document field values of instance constructed via `NewSplitInfo`.
Assert the values in corresponding unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-06-08 19:31:26 +03:00 committed by Alex Vanin
parent 5cbdef1e46
commit dde721ea9f
2 changed files with 24 additions and 0 deletions

View file

@ -13,6 +13,12 @@ func NewSplitInfoFromV2(v2 *object.SplitInfo) *SplitInfo {
return (*SplitInfo)(v2)
}
// NewSplitInfo creates and initializes blank SplitInfo.
//
// Defaults:
// - splitID: nil;
// - lastPart nil;
// - link: nil.
func NewSplitInfo() *SplitInfo {
return NewSplitInfoFromV2(new(object.SplitInfo))
}