Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Use strings.ReplaceAll() rather than strings.Replace() with -1 #376

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

jessp01
Copy link
Contributor

@jessp01 jessp01 commented Nov 1, 2023

Hello,

Well done on creating this exporter.

Also, added a pre-commit hook. To install it:

go install github.com/go-critic/go-critic/cmd/gocritic@latest go install golang.org/x/tools/cmd/goimports@latest go install golang.org/x/lint/golint@latest
go install github.com/gordonklaus/ineffassign@latest pip install pre-commit
pre-commit install

It will then run on every git commit invocation. To run manually on all files, invoke: pre-commit run --all-files

Following the merge of this pull, the only issue that will be reported is:

./main.go:85:3: exitAfterDefer: os.Exit will exit, and defer cancel() will not run

Please see discussion in go-critic/go-critic#1022 for ways to address this.

Cheers,

Also, added a pre-commit hook. To install it:

go install github.com/go-critic/go-critic/cmd/gocritic@latest
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/lint/golint@latest
go install github.com/gordonklaus/ineffassign@latest
pip install pre-commit
pre-commit install

It will then run on every `git commit` invocation. To run manually on
all files:

pre-commit run --all-files
@Yannig Yannig merged commit 5015f5c into iamseth:master Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants