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

Some critical fixes #4

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

Some critical fixes #4

wants to merge 3 commits into from

Conversation

ViRb3
Copy link

@ViRb3 ViRb3 commented Mar 22, 2021

It's 2021, so go module is a must.

When using io.ReadAll, the function will continue reading until io.EOF error is returned. Before this error was never returned, so such an attempt would hang indefinitely.

The Read function never actually wrote anything to the input slice. This is because you were re-assigning the slice variable instead of writing to it, which only replaces the local variable reference, it doesn't actually touch the original slice. You should instead use the copy function.

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.

1 participant