mirror of
https://github.com/hazemKrimi/jack-compiler.git
synced 2026-05-02 01:50:25 +00:00
19 lines
212 B
Go
19 lines
212 B
Go
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
|
|
}
|