Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix lint workflow #330

Merged
merged 2 commits into from
Aug 23, 2024
Merged

ci: fix lint workflow #330

merged 2 commits into from
Aug 23, 2024

Conversation

kyleam
Copy link
Collaborator

@kyleam kyleam commented Aug 21, 2024

Resolve the two lint workflow failures that popped up here: #329 (comment)

ioutil.ReadDir was deprecated in Go 1.16, and the lint workflow has
started to flag it.  The suggested replacement is os.ReadDir, which
returns a list of fs.DirEntry.  For this spot, the downstream code
expects a list of fs.FileInfo, so add the wrapper suggested in the Go
docs.
@kyleam kyleam requested a review from seth127 August 21, 2024 19:02
The latest lint CI run failed with

  SA1019: rand.Seed has been deprecated since Go 1.20 and an
  alternative has been available since Go 1.0: As of Go 1.20 there is
  no reason to call Seed with a random value. [...]

So once our minimum Go version is 1.20.0, we can remove the
rand.Seed() call.
Copy link
Collaborator

@seth127 seth127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@kyleam kyleam merged commit dc9e22c into main Aug 23, 2024
4 checks passed
@kyleam kyleam deleted the lint-fixes branch August 23, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants