refactor: improve code clarity and testing reliability across modules

- Use `strings.ReplaceAll` instead of `strings.Replace` for clarity and conciseness

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2025-04-12 19:42:12 +08:00
parent e2a386e6ec
commit 0c387532cf
No known key found for this signature in database

View File

@ -8,5 +8,5 @@ import (
)
func getRealPath(path string) string {
return "/" + strings.Replace(strings.Replace(path, ":", "", -1), "\\", "/", -1)
return "/" + strings.ReplaceAll(strings.ReplaceAll(path, ":", ""), "\\", "/")
}