[#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:
parent
5cbdef1e46
commit
dde721ea9f
2 changed files with 24 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue