summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/internal/search/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/cmd/go/internal/search/search.go')
-rw-r--r--libgo/go/cmd/go/internal/search/search.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/cmd/go/internal/search/search.go b/libgo/go/cmd/go/internal/search/search.go
index 60ae73696bb..0ca60e73497 100644
--- a/libgo/go/cmd/go/internal/search/search.go
+++ b/libgo/go/cmd/go/internal/search/search.go
@@ -275,7 +275,7 @@ func MatchPattern(pattern string) func(name string) bool {
case strings.HasSuffix(re, `/\.\.\.`):
re = strings.TrimSuffix(re, `/\.\.\.`) + `(/\.\.\.)?`
}
- re = strings.Replace(re, `\.\.\.`, `[^`+vendorChar+`]*`, -1)
+ re = strings.ReplaceAll(re, `\.\.\.`, `[^`+vendorChar+`]*`)
reg := regexp.MustCompile(`^` + re + `$`)
@@ -353,7 +353,7 @@ func CleanPatterns(patterns []string) []string {
// as a courtesy to Windows developers, rewrite \ to /
// in command-line arguments. Handles .\... and so on.
if filepath.Separator == '\\' {
- a = strings.Replace(a, `\`, `/`, -1)
+ a = strings.ReplaceAll(a, `\`, `/`)
}
// Put argument in canonical form, but preserve leading ./.