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.
This commit is contained in:
jagdeep sidhu 2020-11-12 12:11:21 -08:00
parent 7e7f67e2e6
commit 774cf3c1d1

View file

@ -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