aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-05-24 03:28:46 -0700
committerFuwn <[email protected]>2025-05-24 03:28:46 -0700
commitab8c351b1b94bcc882a1378abe0bb14791e71b20 (patch)
treef673cbad36791e2712ae51d1b6566b66e2ec58c7
parent388181c0250f1eb1e1c782ed07f2da4b927e9124 (diff)
downloadgigi-ab8c351b1b94bcc882a1378abe0bb14791e71b20.tar.xz
gigi-ab8c351b1b94bcc882a1378abe0bb14791e71b20.zip
refactor(gigi.go): Use ReplaceAll instead of Replace -1
-rw-r--r--gigi.go8
1 files 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"