From ba60a6c729834f6b2584ef3d32653d42d097f367 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 22 Mar 2024 20:23:14 -0400 Subject: [PATCH] fix: if eof, return the byte count --- import/import.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/import/import.go b/import/import.go index 1a79870..dfc7cd8 100644 --- a/import/import.go +++ b/import/import.go @@ -223,6 +223,9 @@ func (i *ImportReader) Close() error { func (i *ImportReader) Read(p []byte) (n int, err error) { n, err = i.reader.Read(p) if err != nil { + if err == io.EOF { + return n, err + } return 0, err }