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

Document field values of instance constructed via `NewSelector`.
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:39:19 +03:00 committed by Alex Vanin
parent c47d1fb26b
commit 2307c8f8f7
2 changed files with 29 additions and 0 deletions

View file

@ -156,6 +156,13 @@ func (c *Context) getSelectionBase(s *Selector) []nodeAttrPair {
}
// NewSelector creates and returns new Selector instance.
//
// Defaults:
// - name: "";
// - attribute: "";
// - filter: "";
// - clause: ClauseUnspecified;
// - count: 0.
func NewSelector() *Selector {
return NewSelectorFromV2(new(netmap.Selector))
}