From 95159e5585762c06c654945070ba54262b7dcec9 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Sat, 15 Jun 2024 11:13:16 -0700 Subject: Refactoring and cleanup * Split CLI client into separate project * Convert more functions to follow common Golang idioms e.g io.Reader, io.Writer * Use ldflags for versioning * Misc cleanup and simplification --- hotline/file_wrapper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hotline/file_wrapper.go') diff --git a/hotline/file_wrapper.go b/hotline/file_wrapper.go index ec025dc..a26c45a 100644 --- a/hotline/file_wrapper.go +++ b/hotline/file_wrapper.go @@ -207,7 +207,7 @@ func (f *fileWrapper) delete() error { func (f *fileWrapper) flattenedFileObject() (*flattenedFileObject, error) { dataSize := make([]byte, 4) - mTime := make([]byte, 8) + mTime := [8]byte{} ft := defaultFileType @@ -257,8 +257,8 @@ func (f *fileWrapper) flattenedFileObject() (*flattenedFileObject, error) { Flags: []byte{0, 0, 0, 0}, PlatformFlags: []byte{0, 0, 1, 0}, // TODO: What is this? RSVD: make([]byte, 32), - CreateDate: mTime, // some filesystems don't support createTime - ModifyDate: mTime, + CreateDate: mTime[:], // some filesystems don't support createTime + ModifyDate: mTime[:], NameScript: []byte{0, 0}, Name: []byte(f.name), NameSize: []byte{0, 0}, -- cgit