forked from TrueCloudLab/frostfs-api-go
[#302] pkg/storagegroup: Document default values set in New
Document field values of instance constructed via `New`. Assert the values in corresponding unit test. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
934cf8ecc8
commit
3bc25f54d8
2 changed files with 26 additions and 0 deletions
|
@ -18,6 +18,12 @@ func NewFromV2(aV2 *storagegroup.StorageGroup) *StorageGroup {
|
|||
}
|
||||
|
||||
// New creates and initializes blank StorageGroup.
|
||||
//
|
||||
// Defaults:
|
||||
// - size: 0;
|
||||
// - exp: 0;
|
||||
// - members: nil;
|
||||
// - hash: nil.
|
||||
func New() *StorageGroup {
|
||||
return NewFromV2(new(storagegroup.StorageGroup))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue