From 7ac1c2ccb9fe43dc6a87c43e00bfc829ed164430 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 7 Feb 2022 22:08:02 +0400 Subject: [PATCH] Removed excessive vars from SplitNetworkAddress(). --- internal/configuration/configuration.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/configuration/configuration.go b/internal/configuration/configuration.go index 353c448..fb8ebb6 100644 --- a/internal/configuration/configuration.go +++ b/internal/configuration/configuration.go @@ -51,8 +51,7 @@ func LoadConfiguration(path string) (*Configuration, error) { // SplitNetworkAddress splits ListenOn option and returns as two strings // network type (e.g. tcp, unix, udp) and address:port or /path/to/prog.socket // to listen on. -func (c *Configuration) SplitNetworkAddress() (n string, a string) { +func (c *Configuration) SplitNetworkAddress() (string, string) { s := strings.Split(c.ListenOn, " ") - n, a = s[0], s[1] - return n, a + return s[0], s[1] }