forked from TrueCloudLab/frostfs-api-go
[#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:
parent
783c323d95
commit
8254da2890
3 changed files with 20 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue