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

fix(shell): use syscall.stdin instead of os.stdin.fd() #183

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

DexterYan
Copy link
Member

@DexterYan DexterYan commented Sep 3, 2024

  • solve the make lint error fail with Potential integer overflow when converting between integer types

syscall.Stdin is for a low-level operation and return int
os.Stdin is high-level Read method to read input normally. but os.Stdin.Fd() return uintptr which need to be convert to int

@DexterYan DexterYan changed the title fix(shell): int issue fix(shell): use syscall.stdin instead of os.stdin.fd() Sep 3, 2024
@nvanthao nvanthao self-requested a review September 3, 2024 07:06
Copy link
Member

@nvanthao nvanthao left a comment

Choose a reason for hiding this comment

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

LGTM and the lint is gone :D

@banjoh banjoh merged commit eb28ee6 into main Sep 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants