[#362] cmd/node: Use const key to UN/LOCODE attribute from the API lib

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-02-10 23:56:14 +03:00 committed by Leonard Lyubich
parent a737a46988
commit 3b9d4b4df1

View file

@ -46,14 +46,11 @@ type wellKnownNodeAttrDesc struct {
defaultVal string
}
// TODO: define attribute keys in API lib.
const attrKeyLocode = "UN-LOCODE"
func listWellKnownAttrDesc() map[string]wellKnownNodeAttrDesc {
return map[string]wellKnownNodeAttrDesc{
netmap.AttrPrice: {defaultVal: strconv.FormatUint(defaultPrice, 10)},
netmap.AttrCapacity: {defaultVal: strconv.FormatUint(defaultCapacity, 10)},
attrKeyLocode: {explicit: true},
netmap.AttrUNLOCODE: {explicit: true},
}
}