-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use golang.org/x/sys
#22
Conversation
efcd1b5
to
059628e
Compare
@danieljoos ptal 🤗 |
return syscall.StringToUTF16(str) | ||
res, err := syscall.UTF16FromString(str) | ||
if err != nil { | ||
return []uint16{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is a slight change in behavior. The old implementation would have panic'ed.
New solution is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome.
Thank you very much for this contribution.
Not sure about these failing builds. Is there something missing in the workflow config? |
29ac408
to
5bb5bb3
Compare
@danieljoos Should work now :) |
This PR removes the
syscall
package to use thegolang.org/x/sys
one.As stipulated in https://pkg.go.dev/syscall:
Also
utf16PtrToString
has been moved to the native golang.org/x/sys/windows#UTF16PtrToString.In addition I've updated the workflow to use a matrix against Go 1.14, 1.15, 1.16, 1.17 and also push coverage results to Codacy. The workflow
godev.yml
has been added to be able to automatically refreshpkg.go.dev
doc on new release.Dependabot has also been added to keep dependencies up to date (gomod and github actions).
Finally, some fancy badges and move to
pkg.go.dev
for docs.If you wish I can break this down into several PRs.