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

Minor cosmetic fixes, add few comments/questions. #6

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

creack
Copy link

@creack creack commented Oct 28, 2023

Probably nothing, but there were a few places where the error was ignored due to scope. Added a few todos, if you could double check it would be great.

Almsot there :)

@photostorm
Copy link
Owner

Will do, thanks

//
// ref: https://pkg.go.dev/[email protected]?GOOS=windows#LoadDLL
// Ref: https://pkg.go.dev/[email protected]?GOOS=windows#LoadDLL
kernel32DLL = windows.NewLazyDLL("kernel32.dll")
Copy link
Author

Choose a reason for hiding this comment

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

Isn't it a concern that this will be executed by anyone importing the package, even if they don't use it?

Copy link
Owner

Choose a reason for hiding this comment

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

I don't think it's a concern since the windows package also does it this way. We are not actually loading the DLL. The DLL is loaded when we call the Find method if it is not already loaded.

@photostorm photostorm merged commit 96e45d8 into photostorm:master Oct 28, 2023
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