mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-21 19:20:39 +00:00
Replace strings.Replace with strings.ReplaceAll (#5128)
This commit is contained in:
parent
78e9703bd7
commit
8283c68335
@ -220,7 +220,7 @@ func (dev *fakeIGD) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (dev *fakeIGD) replaceListenAddr(resp string) string {
|
||||
return strings.Replace(resp, "{{listenAddr}}", dev.listener.Addr().String(), -1)
|
||||
return strings.ReplaceAll(resp, "{{listenAddr}}", dev.listener.Addr().String())
|
||||
}
|
||||
|
||||
func (dev *fakeIGD) listen() (err error) {
|
||||
|
@ -1133,7 +1133,7 @@ func encodeTestSlice(n uint) []byte {
|
||||
}
|
||||
|
||||
func unhex(str string) []byte {
|
||||
b, err := hex.DecodeString(strings.Replace(str, " ", "", -1))
|
||||
b, err := hex.DecodeString(strings.ReplaceAll(str, " ", ""))
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("invalid hex string: %q", str))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user