Skip to content

Linter and link fixes, allow handling of "abort error" #35

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

hut8
Copy link

@hut8 hut8 commented Apr 17, 2025

This is a group of a couple of fixes:

  1. go-staticcheck says that error messages shouldn't begin with capital letters. So I downcased them.
  2. return errors.New("abort signal receive") was present in the middle of a function during the crawling of /sys/devices. That makes it so that we can't distinguish between that particular error and any other error (at least, not easily). That error is special because it's one that's actually triggered by the user just to stop the crawling process, so the user is very likely to treat it as not an error. This makes that possible.
  3. ioutil has been deprecated for a long time now, so I replaced that with io.* or os.*.
  4. It was very helpful of you to include links to kernel source where applicable. Unfortunately those links died, so I replaced them with working ones.

@hut8 hut8 marked this pull request as draft April 18, 2025 00:08
@pilebones
Copy link
Owner

Hello, ty for this initiative, I really appreciate.

I planned to do a lot of changes soon like you did, because several enhancement about go, tools and linters exists since I start to impl this library. And many idea to enhance this lib to do in my head.

I'm ok to merge your contributions asap to restart the machine on this project. Please let me know when it will be not a draft.

Have a good day :)

@pilebones pilebones self-requested a review April 18, 2025 15:20
@pilebones pilebones added quality Code quality ci continuous improvement labels Apr 18, 2025
@pilebones
Copy link
Owner

I re-run golangci-lint to fix linters issues and push fixes to master, could you rebase your PR for merging the other purpose from your PR please ?

@pilebones pilebones force-pushed the master branch 3 times, most recently from 5c1ec37 to c3fe89d Compare April 21, 2025 17:33
@hut8
Copy link
Author

hut8 commented Apr 22, 2025

Yes, I will be happy to!

@hut8 hut8 force-pushed the liam/linter-and-link-fixes branch from 0b44c10 to 01072ba Compare April 23, 2025 18:18
@hut8 hut8 marked this pull request as ready for review April 23, 2025 18:20
@hut8
Copy link
Author

hut8 commented Apr 23, 2025

Rebased: let me know what you think 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci continuous improvement quality Code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants