From 7871452cbff49af3e7e015f0dac18d4bd2a9e064 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 24 May 2025 10:28:46 +0000 Subject: refactor(gigi.go): Use ReplaceAll instead of Replace -1 --- gigi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gigi.go b/gigi.go index 3b2d81a..eff800f 100644 --- a/gigi.go +++ b/gigi.go @@ -60,10 +60,10 @@ func handleConnection(connection net.Conn, mode int) { return } - bufferContent := strings.Replace( - strings.Replace( - strings.Replace(string(connectionReadBuffer), "\x00", "", -1), - "\n", "", -1), "\r", "", -1) + bufferContent := strings.ReplaceAll( + strings.ReplaceAll( + strings.ReplaceAll(string(connectionReadBuffer), "\x00", ""), + "\n", ""), "\r", "") if len(bufferContent) == 0 { bufferContent = "default" -- cgit v1.2.3