From b723c92ef86b2ce1e12b86e0268b7673503652fc Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 23 Jun 2021 12:24:01 +0300 Subject: [PATCH] [#607] network: Make Address.Equal method unexported The method is used only in the same package. Signed-off-by: Leonard Lyubich --- pkg/network/address.go | 4 ++-- pkg/network/group.go | 2 +- pkg/network/tls_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/network/address.go b/pkg/network/address.go index a7831dcfb..8fe808a20 100644 --- a/pkg/network/address.go +++ b/pkg/network/address.go @@ -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) } diff --git a/pkg/network/group.go b/pkg/network/group.go index b2bf5fabe..ec9995083 100644 --- a/pkg/network/group.go +++ b/pkg/network/group.go @@ -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 } } diff --git a/pkg/network/tls_test.go b/pkg/network/tls_test.go index 122568b33..cdcf1e769 100644 --- a/pkg/network/tls_test.go +++ b/pkg/network/tls_test.go @@ -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) } }