aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/path/filepath/path.go')
-rw-r--r--src/path/filepath/path.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path/filepath/path.go b/src/path/filepath/path.go
index 1508137a33..aba1717e7d 100644
--- a/src/path/filepath/path.go
+++ b/src/path/filepath/path.go
@@ -166,7 +166,7 @@ func ToSlash(path string) string {
if Separator == '/' {
return path
}
- return strings.Replace(path, string(Separator), "/", -1)
+ return strings.ReplaceAll(path, string(Separator), "/")
}
// FromSlash returns the result of replacing each slash ('/') character
@@ -176,7 +176,7 @@ func FromSlash(path string) string {
if Separator == '/' {
return path
}
- return strings.Replace(path, "/", string(Separator), -1)
+ return strings.ReplaceAll(path, "/", string(Separator))
}
// SplitList splits a list of paths joined by the OS-specific ListSeparator,