From 774cf3c1d12cad8bc01abdc9f1027639f63ca923 Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Thu, 12 Nov 2020 12:11:21 -0800 Subject: [PATCH] Update node.go functional replacement for https://golang.org/pkg/strings/#Replace to https://golang.org/pkg/strings/#ReplaceAll since 1.31 golangci-lint gocritic was updated to include replace to replaceall hint. ReplaceAll was added in Go 1.12 See https://github.com/go-critic/go-critic/issues/872 for more. --- bitcoin/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/node.go b/bitcoin/node.go index 7782525..f657a10 100644 --- a/bitcoin/node.go +++ b/bitcoin/node.go @@ -43,7 +43,7 @@ func logPipe(ctx context.Context, pipe io.ReadCloser, identifier string) error { return err } - message := strings.Replace(str, "\n", "", -1) + message := strings.ReplaceAll(str, "\n", "") messages := strings.SplitAfterN(message, " ", 2) // Trim the timestamp from the log if it exists