From b129b7cbc9fd9a9c11a77e5922861ef08893efa1 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Sat, 8 Jun 2024 20:36:04 -0700 Subject: Convert bespoke methods to io.Reader/io.Writer interfaces --- hotline/files.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hotline/files.go') diff --git a/hotline/files.go b/hotline/files.go index dcabf9d..d4bea53 100644 --- a/hotline/files.go +++ b/hotline/files.go @@ -3,6 +3,7 @@ package hotline import ( "encoding/binary" "errors" + "io" "io/fs" "os" "path/filepath" @@ -132,7 +133,7 @@ func getFileNameList(path string, ignoreList []string) (fields []Field, err erro fnwi.name = []byte(strippedName) - b, err := fnwi.MarshalBinary() + b, err := io.ReadAll(&fnwi) if err != nil { return nil, err } -- cgit