mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-03-05 14:57:01 -05: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:
parent
e2a386e6ec
commit
0c387532cf
@ -8,5 +8,5 @@ import (
|
||||
)
|
||||
|
||||
func getRealPath(path string) string {
|
||||
return "/" + strings.Replace(strings.Replace(path, ":", "", -1), "\\", "/", -1)
|
||||
return "/" + strings.ReplaceAll(strings.ReplaceAll(path, ":", ""), "\\", "/")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user