From 0c387532cfac6f5c9f88e8005796503312ceac90 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sat, 12 Apr 2025 19:42:12 +0800 Subject: [PATCH] refactor: improve code clarity and testing reliability across modules - Use `strings.ReplaceAll` instead of `strings.Replace` for clarity and conciseness Signed-off-by: appleboy --- path_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path_windows.go b/path_windows.go index 587dcd9..9c34802 100644 --- a/path_windows.go +++ b/path_windows.go @@ -8,5 +8,5 @@ import ( ) func getRealPath(path string) string { - return "/" + strings.Replace(strings.Replace(path, ":", "", -1), "\\", "/", -1) + return "/" + strings.ReplaceAll(strings.ReplaceAll(path, ":", ""), "\\", "/") }