forked from TrueCloudLab/frostfs-api-go
[#302] pkg/netmap: Document default values set in NewNetworkInfo
Document field values of instance constructed via `NewNetworkInfo`. Assert the values in corresponding unit test. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
6142a352da
commit
19cf3c2d0b
2 changed files with 18 additions and 0 deletions
|
@ -16,6 +16,10 @@ func NewNetworkInfoFromV2(iV2 *netmap.NetworkInfo) *NetworkInfo {
|
|||
}
|
||||
|
||||
// NewNetworkInfo creates and initializes blank NetworkInfo.
|
||||
//
|
||||
// Defaults:
|
||||
// - curEpoch: 0;
|
||||
// - magicNum: 0.
|
||||
func NewNetworkInfo() *NetworkInfo {
|
||||
return NewNetworkInfoFromV2(new(netmap.NetworkInfo))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue