initial commit

This commit is contained in:
2025-06-06 16:47:33 +02:00
commit 6df18eb794
14 changed files with 846 additions and 0 deletions

25
filehandle.go Normal file
View File

@ -0,0 +1,25 @@
package main
import (
"io"
)
type FileHandle struct {
File string
Chan chan byte
Writer io.Writer
}
func (fh *FileHandle) Close() error {
close(fh.Chan)
return nil
}
func NewFileHandle(path string) *FileHandle {
out := make(chan byte, 4096)
return &FileHandle{
File: path,
Chan: out,
Writer: NewWriterFromByteChan(out),
}
}