[#302] pkg/netmap: Document default values set in NewReplica

Document field values of instance constructed via `NewReplica`.
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 18:29:16 +03:00 committed by Alex Vanin
parent fb591f5fac
commit af1742b48a
2 changed files with 20 additions and 0 deletions

View file

@ -8,6 +8,10 @@ import (
type Replica netmap.Replica
// NewReplica creates and returns new Replica instance.
//
// Defaults:
// - count: 0;
// - selector: "".
func NewReplica() *Replica {
return NewReplicaFromV2(new(netmap.Replica))
}