all: Simplify some method calls (#7499)

strings.Replace(a, b, c, -1) -> strings.ReplaceAll(a, b, c)

(Go 1.12) and who knows what was up with that dialQueue.Sort() thing.
This commit is contained in:
Jakob Borg
2021-03-17 23:12:26 +01:00
committed by GitHub
parent 960e850a78
commit 8ef504f745
10 changed files with 18 additions and 19 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ USER-AGENT: syncthing/1.0
`
searchStr := fmt.Sprintf(tpl, deviceType, timeout/time.Second)
search := []byte(strings.Replace(searchStr, "\n", "\r\n", -1) + "\r\n")
search := []byte(strings.ReplaceAll(searchStr, "\n", "\r\n") + "\r\n")
l.Debugln("Starting discovery of device type", deviceType, "on", intf.Name)