From b2b33aeac9c25888f8022f85716efc95a3e8ab1e Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 16 Jun 2021 13:21:24 +0300 Subject: [PATCH] [#607] network: Don't export L4 protocol constant Const is used for internal package needs only. Signed-off-by: Leonard Lyubich --- pkg/network/address.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/network/address.go b/pkg/network/address.go index d37e08b44..af4a11b0b 100644 --- a/pkg/network/address.go +++ b/pkg/network/address.go @@ -15,10 +15,6 @@ import ( IPAddr strings: "192.168.0.1:8080" */ -const ( - L4Protocol = "tcp" -) - // Address represents the NeoFS node // network address. type Address struct { @@ -125,7 +121,9 @@ func multiaddrStringFromHostAddr(host string) (string, error) { } } - return strings.Join([]string{prefix, addr, L4Protocol, port}, "/"), nil + const l4Protocol = "tcp" + + return strings.Join([]string{prefix, addr, l4Protocol, port}, "/"), nil } // IsLocalAddress returns true if network endpoint from local address