Open akanchha25 opened 1 month ago
@akanchha25 Indeed it's a good improvement. Do you think errors should be unexpeorted? If we export them then they could be used to check for given error like with io.EOF
@janisz That's a great point. Exporting the errors would indeed allow for more robust error handling, similar to checking for specific errors like io.EOF. This could be beneficial for users of the BytesQueue package to handle different error scenarios more explicitly.
I can update the code to export these error variables, making it easier for others to handle specific error conditions. I'll proceed with the changes if that sounds good to you.
The Push function in BytesQueue currently uses a generic error message when the queue is full. It is suggested to use errFullQueue for a more descriptive error message.
Current Code:
Push function
Updated code
This will improve the code quality