diff options
| author | Fuwn <[email protected]> | 2025-05-24 03:28:46 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-24 03:28:46 -0700 |
| commit | ab8c351b1b94bcc882a1378abe0bb14791e71b20 (patch) | |
| tree | f673cbad36791e2712ae51d1b6566b66e2ec58c7 | |
| parent | 388181c0250f1eb1e1c782ed07f2da4b927e9124 (diff) | |
| download | gigi-ab8c351b1b94bcc882a1378abe0bb14791e71b20.tar.xz gigi-ab8c351b1b94bcc882a1378abe0bb14791e71b20.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" |