From dc73e1a2ebf45c7ad6aff74e3e4dbda2091fbc13 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Sat, 5 Apr 2025 08:03:56 +0300 Subject: [PATCH] [#353] Format deprecated notices properly They should be in a separate paragraph, otherwise they are not recognized. Signed-off-by: Evgenii Stratonikov --- api/netmap/types.go | 1 + netmap/node_info.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/api/netmap/types.go b/api/netmap/types.go index 9d9fa09..6dfe676 100644 --- a/api/netmap/types.go +++ b/api/netmap/types.go @@ -439,6 +439,7 @@ func (ni NodeInfo) Addresses() iter.Seq[string] { // Breaks iteration on f's true return. // // Handler should not be nil. +// // Deprecated: use [NodeInfo.Addresses] instead. func (ni *NodeInfo) IterateAddresses(f func(string) bool) { if ni != nil { diff --git a/netmap/node_info.go b/netmap/node_info.go index acbfaee..22683e5 100644 --- a/netmap/node_info.go +++ b/netmap/node_info.go @@ -201,6 +201,7 @@ func (x NodeInfo) NumberOfNetworkEndpoints() int { // FrostFS system requirements. // // See also SetNetworkEndpoints. +// // Deprecated: use [NodeInfo.NetworkEndpoints] instead. func (x NodeInfo) IterateNetworkEndpoints(f func(string) bool) { for s := range x.NetworkEndpoints() { @@ -220,6 +221,7 @@ func (x NodeInfo) NetworkEndpoints() iter.Seq[string] { // IterateNetworkEndpoints is an extra-sugared function over IterateNetworkEndpoints // method which allows to unconditionally iterate over all node's network endpoints. +// // Deprecated: use [NodeInfo.NetworkEndpoints] instead. func IterateNetworkEndpoints(node NodeInfo, f func(string)) { node.IterateNetworkEndpoints(func(addr string) bool { @@ -422,6 +424,7 @@ func (x NodeInfo) Attributes() iter.Seq2[string, string] { // IterateAttributes iterates over all node attributes and passes the into f. // Handler MUST NOT be nil. +// // Deprecated: use [NodeInfo.Attributes] instead. func (x NodeInfo) IterateAttributes(f func(key, value string)) { a := x.m.GetAttributes()