Allow to parse single unnamed selectors #162

Merged
fyrchik merged 3 commits from fyrchik/frostfs-sdk-go:fix-netmap into master 2024-09-04 19:51:15 +00:00
Showing only changes of commit 4df642e941 - Show all commits

View file

@ -258,6 +258,9 @@ func (m NetMap) ContainerNodes(p PlacementPolicy, pivot []byte) ([][]NodeInfo, e
}
if p.unique {
if c.processedSelectors[sName] == nil {
return nil, fmt.Errorf("selector not found: '%s'", sName)
}
nodes, err := c.getSelection(*c.processedSelectors[sName])
if err != nil {
return nil, err