diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2021-08-10 18:52:46 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2021-08-10 13:52:46 -0700 |
| commit | 72dd37f1abb2b550aaaac48eac677403d5664797 (patch) | |
| tree | 5c431679475647f2f932f2934e6acd65090d2499 /hotline/file_header.go | |
| parent | 9d41bcdf29778eab3253f8e31670baf64ad389bf (diff) | |
Add tests and clean up
Diffstat (limited to 'hotline/file_header.go')
| -rw-r--r-- | hotline/file_header.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hotline/file_header.go b/hotline/file_header.go index 60c652e..7e0df16 100644 --- a/hotline/file_header.go +++ b/hotline/file_header.go @@ -27,6 +27,15 @@ func NewFileHeader(fileName string, isDir bool) FileHeader { return fh } +func (fh *FileHeader) Read(p []byte) (n int, err error) { + p = concat.Slices( + fh.Size, + fh.Type, + fh.FilePath, + ) + return len(p), nil +} + func (fh *FileHeader) Payload() []byte { return concat.Slices( fh.Size, |