[#255] pkg/netmap: Move common substring of well-known attributes to prefix

Rename `PriceAttr` constant to `AttrPrice`. Rename `CapacityAttr` constant
to `AttrCapacity`. Add documentation to both of them.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-02-10 21:51:16 +03:00 committed by Alex Vanin
parent 783c323d95
commit 8254da2890
3 changed files with 20 additions and 15 deletions

View file

@ -115,9 +115,9 @@ func (c *Context) matchKeyValue(f *Filter, b *Node) bool {
var attr uint64
switch f.Key() {
case PriceAttr:
case AttrPrice:
attr = b.Price
case CapacityAttr:
case AttrCapacity:
attr = b.Capacity
default:
var err error