diff options
| author | Fuwn <[email protected]> | 2025-05-24 10:28:46 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-24 10:28:46 +0000 |
| commit | 7871452cbff49af3e7e015f0dac18d4bd2a9e064 (patch) | |
| tree | 6845e2cfd31f1c80c4099fda58639e6a57a509e3 | |
| parent | feat(gigi.go): Emit connection write errors (diff) | |
| download | gigi-7871452cbff49af3e7e015f0dac18d4bd2a9e064.tar.xz gigi-7871452cbff49af3e7e015f0dac18d4bd2a9e064.zip | |
refactor(gigi.go): Use ReplaceAll instead of Replace -1
| -rw-r--r-- | gigi.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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" |