forked from TrueCloudLab/frostfs-node
[#1238] Adopt neofs-ir for non pointer slices in SDK
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
7f3195b197
commit
9fad29dfe0
9 changed files with 28 additions and 27 deletions
|
@ -67,7 +67,7 @@ func (v *Validator) VerifyAndUpdate(n *netmap.NodeInfo) error {
|
|||
continue
|
||||
}
|
||||
|
||||
a := netmap.NewNodeAttribute()
|
||||
var a netmap.NodeAttribute
|
||||
a.SetKey(attrKey)
|
||||
a.SetValue(attrVal)
|
||||
|
||||
|
@ -86,8 +86,8 @@ func (v *Validator) VerifyAndUpdate(n *netmap.NodeInfo) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func uniqueAttributes(as []*netmap.NodeAttribute) map[string]*netmap.NodeAttribute {
|
||||
mAttr := make(map[string]*netmap.NodeAttribute, len(as))
|
||||
func uniqueAttributes(as []netmap.NodeAttribute) map[string]netmap.NodeAttribute {
|
||||
mAttr := make(map[string]netmap.NodeAttribute, len(as))
|
||||
|
||||
for _, attr := range as {
|
||||
mAttr[attr.Key()] = attr
|
||||
|
|
|
@ -35,7 +35,7 @@ func (x db) Get(lc *locodestd.LOCODE) (locode.Record, error) {
|
|||
}
|
||||
|
||||
func addAttrKV(n *netmap.NodeInfo, key, val string) {
|
||||
a := netmap.NewNodeAttribute()
|
||||
var a netmap.NodeAttribute
|
||||
|
||||
a.SetKey(key)
|
||||
a.SetValue(val)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue