fix linting step (#1235)

This commit is contained in:
Dustin Decker 2023-04-03 13:21:58 -07:00 committed by GitHub
parent 58222610ff
commit 20d5683199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ check:
go vet $(shell go list ./... | grep -v /vendor/)
lint:
golangci-lint run --enable bodyclose --out-format=colored-line-number --timeout 10m
golangci-lint run --enable bodyclose --enable exportloopref --out-format=colored-line-number --timeout 10m
test-failing:
CGO_ENABLED=0 go test -timeout=5m $(shell go list ./... | grep -v /vendor/) | grep FAIL

View file

@ -40,7 +40,7 @@ func (s Scanner) Keywords() []string {
func randString(n int) string {
const alphanum = "0123456789abcdefghijklmnopqrstuvwxyz"
var bytes = make([]byte, n)
rand.Read(bytes)
_, _ = rand.Read(bytes)
for i, b := range bytes {
bytes[i] = alphanum[b%byte(len(alphanum))]
}