From 774cf3c1d12cad8bc01abdc9f1027639f63ca923 Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Thu, 12 Nov 2020 12:11:21 -0800 Subject: [PATCH 1/2] 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 From 5e4a24e68d43908c8605316c15edcf962d3580e3 Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Thu, 12 Nov 2020 16:52:39 -0800 Subject: [PATCH 2/2] Update config.yml closes #40. Update go version in circle config file tested: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b $(go env GOPATH)/bin v1.32.2 [sudo] password for jag: golangci/golangci-lint info checking GitHub for tag 'v1.32.2' golangci/golangci-lint info found version: 1.32.2 for v1.32.2/linux/amd64 golangci/golangci-lint info installed /home/jag/go/bin/golangci-lint" --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 63b58b7..c6bbe5c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,7 +50,7 @@ jobs: name: default steps: - *fast-checkout - - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 + - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.32.2 - run: make lint check-license: executor: