trufflehog icon indicating copy to clipboard operation
trufflehog copied to clipboard

Fix errcheck / gopls nits in main.go

Open bradlarsen opened this issue 2 months ago • 0 comments

Description:

This PR fixes 3 nits identified by errcheck and the gopls LSP server:

  • Adds missing error checking around a fallible os.SetEnv call
  • Switches a loop over a call to strings.Split to call the more efficient strings.SplitSeq instead
  • 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 lint this requires golangci-lint)?

bradlarsen avatar Aug 22 '25 22:08 bradlarsen