mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-06-04 10:15:05 +08:00
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:
+1
-1
@@ -8,5 +8,5 @@ import (
|
||||
)
|
||||
|
||||
func getRealPath(path string) string {
|
||||
return "/" + strings.Replace(strings.Replace(path, ":", "", -1), "\\", "/", -1)
|
||||
return "/" + strings.ReplaceAll(strings.ReplaceAll(path, ":", ""), "\\", "/")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user