feat: error handling utility for buffered reader

This commit is contained in:
2026-04-20 21:28:46 +01:00
parent 33fb7d863a
commit a1b37e5c52
+18
View File
@@ -0,0 +1,18 @@
package utils
import (
"errors"
"io"
)
func CheckReaderError(err error) (bool, bool) {
if err != nil {
if errors.Is(err, io.EOF) {
return true, true
}
return true, false
}
return false, false
}