trufflehog
trufflehog copied to clipboard
Fix errcheck / gopls nits in main.go
Description:
This PR fixes 3 nits identified by errcheck and the gopls LSP server:
- Adds missing error checking around a fallible
os.SetEnvcall - Switches a loop over a call to
strings.Splitto call the more efficientstrings.SplitSeqinstead - Switches an older-style counting loop to use the newer range-over-int added in Go 1.22 in Feb 2024
These are pedantic nits. The changes should not noticeably affect runtime behavior, but will quiet down editor tools.
Checklist:
- [X] Tests passing (
make test-community)? - [X] Lint passing (
make lintthis requires golangci-lint)?