Correctly handle empty files

Former-commit-id: d166aa352ce4bf32739ddc2f7d1c9967918822fd
This commit is contained in:
2023-10-16 15:34:06 +02:00
parent e8c55a2b6b
commit 6a6a6f6f2c
4 changed files with 19 additions and 35 deletions

View File

@@ -114,19 +114,8 @@ func FastaChunkReader(r io.Reader, size int, cutHead bool) (chan FastxChunk, err
end := []byte{}
for err == nil && n > 0 {
// fmt.Println("============end=========================")
// fmt.Println(string(end))
// fmt.Println("------------buff------------------------")
// fmt.Println(string(buff))
buff = Concatenate(end, buff)
// fmt.Println("------------buff--pasted----------------")
// fmt.Println(string(buff))
buff, end = lastFastaCut(buff)
// fmt.Println("----------------buff--cutted------------")
// fmt.Println(string(buff))
// fmt.Println("------------------end-------------------")
// fmt.Println(string(end))
// fmt.Println("========================================")
if len(buff) > 0 {
out <- FastxChunk{
Bytes: bytes.Clone(buff),