From c9f1ccb9aad46c255db7746bd18144bc7992e99c Mon Sep 17 00:00:00 2001 From: bigbear <155267841+aso20455@users.noreply.github.com> Date: Sat, 13 Sep 2025 19:37:14 +0200 Subject: [PATCH] node: optimize port formatting using strconv.Itoa --- node/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/node/config.go b/node/config.go index dc436876cc..33070aaac5 100644 --- a/node/config.go +++ b/node/config.go @@ -23,6 +23,7 @@ import ( "os" "path/filepath" "runtime" + "strconv" "strings" "github.com/ethereum/go-ethereum/common" @@ -264,7 +265,7 @@ func (c *Config) HTTPEndpoint() string { if c.HTTPHost == "" { return "" } - return net.JoinHostPort(c.HTTPHost, fmt.Sprintf("%d", c.HTTPPort)) + return net.JoinHostPort(c.HTTPHost, strconv.Itoa(c.HTTPPort)) } // DefaultHTTPEndpoint returns the HTTP endpoint used by default. @@ -279,7 +280,7 @@ func (c *Config) WSEndpoint() string { if c.WSHost == "" { return "" } - return net.JoinHostPort(c.WSHost, fmt.Sprintf("%d", c.WSPort)) + return net.JoinHostPort(c.WSHost, strconv.Itoa(c.WSPort)) } // DefaultWSEndpoint returns the websocket endpoint used by default.