ichiban / prolog

The only reasonable scripting engine for Go.
MIT License
564 stars 27 forks source link

fix end_of_stream detection #305

Closed ichiban closed 1 year ago

ichiban commented 1 year ago

https://github.com/ichiban/prolog/issues/300

peek() based detection requires extra bytes from the io.Reader. Use buffered bytes and file sizes instead.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b77736e) 99.18% compared to head (6e740e8) 99.18%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #305 +/- ## ======================================= Coverage 99.18% 99.18% ======================================= Files 23 23 Lines 7258 7272 +14 ======================================= + Hits 7199 7213 +14 Misses 53 53 Partials 6 6 ``` | [Files Changed](https://app.codecov.io/gh/ichiban/prolog/pull/305?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase) | Coverage Δ | | |---|---|---| | [engine/builtin.go](https://app.codecov.io/gh/ichiban/prolog/pull/305?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase#diff-ZW5naW5lL2J1aWx0aW4uZ28=) | `99.52% <100.00%> (-0.01%)` | :arrow_down: | | [engine/stream.go](https://app.codecov.io/gh/ichiban/prolog/pull/305?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yutaka+Ichibangase#diff-ZW5naW5lL3N0cmVhbS5nbw==) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.