From 046096ec4609219311d4f1a00cf4c491f4508120 Mon Sep 17 00:00:00 2001
From: Michael Li
Date: Thu, 5 Dec 2024 22:58:00 -0800
Subject: [PATCH] lint
---
receiver/statsdreceiver/internal/transport/uds_server.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/receiver/statsdreceiver/internal/transport/uds_server.go b/receiver/statsdreceiver/internal/transport/uds_server.go
index 7ecf63e10083..7884b8627917 100644
--- a/receiver/statsdreceiver/internal/transport/uds_server.go
+++ b/receiver/statsdreceiver/internal/transport/uds_server.go
@@ -48,7 +48,7 @@ func (u *udsServer) Close() error {
func prepareSocket(socketPath string) error {
if _, err := os.Stat(socketPath); err == nil {
// File exists, remove it
- if err := os.Remove(socketPath); err != nil {
+ if err = os.Remove(socketPath); err != nil {
return fmt.Errorf("failed to remove existing socket file: %w", err)
}
} else if !os.IsNotExist(err) {