[#607] network: Make Address.Equal method unexported

The method is used only in the same package.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-23 12:24:01 +03:00 committed by Leonard Lyubich
parent 61cc70d899
commit b723c92ef8
3 changed files with 4 additions and 4 deletions

View file

@ -32,8 +32,8 @@ func (a Address) String() string {
return a.ma.String()
}
// Equal compares Address's.
func (a Address) Equal(addr Address) bool {
// equal compares Address's.
func (a Address) equal(addr Address) bool {
return a.ma.Equal(addr.ma)
}

View file

@ -129,7 +129,7 @@ func (x AddressGroup) WriteToNodeInfo(ni *netmap.NodeInfo) {
func (x AddressGroup) Intersects(x2 AddressGroup) bool {
for i := range x {
for j := range x2 {
if x[i].Equal(x2[j]) {
if x[i].equal(x2[j]) {
return true
}
}

View file

@ -48,6 +48,6 @@ func TestAddress_AddTLS(t *testing.T) {
err := netAddr.FromString(test.want)
require.NoError(t, err)
require.True(t, netAddr.Equal(addr), test.input)
require.True(t, netAddr.equal(addr), test.input)
}
}