From 87d772a7d708fec12f48cd8adc0dedff6e1025da Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 26 Aug 2024 10:15:20 +0200 Subject: Adding upstream version 1.47.0. Signed-off-by: Daniel Baumann --- src/go/collectors/go.d.plugin/pkg/socket/utils.go | 25 ----------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/go/collectors/go.d.plugin/pkg/socket/utils.go (limited to 'src/go/collectors/go.d.plugin/pkg/socket/utils.go') diff --git a/src/go/collectors/go.d.plugin/pkg/socket/utils.go b/src/go/collectors/go.d.plugin/pkg/socket/utils.go deleted file mode 100644 index dcc48b383..000000000 --- a/src/go/collectors/go.d.plugin/pkg/socket/utils.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later - -package socket - -import "strings" - -func IsUnixSocket(address string) bool { - return strings.HasPrefix(address, "/") || strings.HasPrefix(address, "unix://") -} - -func IsUdpSocket(address string) bool { - return strings.HasPrefix(address, "udp://") -} - -func networkType(address string) (string, string) { - switch { - case IsUnixSocket(address): - address = strings.TrimPrefix(address, "unix://") - return "unix", address - case IsUdpSocket(address): - return "udp", strings.TrimPrefix(address, "udp://") - default: - return "tcp", strings.TrimPrefix(address, "tcp://") - } -} -- cgit v1.2.3