From 22aed78048ee5b426298c1122e483106cc0419ec Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Fri, 6 Jun 2025 15:20:43 -0700 Subject: [PATCH] Update gguf_test.go --- fs/gguf/gguf_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/gguf/gguf_test.go b/fs/gguf/gguf_test.go index bdd661f01..1e014212a 100644 --- a/fs/gguf/gguf_test.go +++ b/fs/gguf/gguf_test.go @@ -212,7 +212,7 @@ func writeKeyValue(file *os.File, key string, value any) error { // Write value based on type switch v := value.(type) { case string: - if err := binary.Write(file, binary.LittleEndian, uint32(typeString)); err != nil { + if err := binary.Write(file, binary.LittleEndian, typeString); err != nil { return err } if err := binary.Write(file, binary.LittleEndian, uint64(len(v))); err != nil { @@ -231,12 +231,12 @@ func writeKeyValue(file *os.File, key string, value any) error { } return binary.Write(file, binary.LittleEndian, v) case float64: - if err := binary.Write(file, binary.LittleEndian, uint32(typeFloat64)); err != nil { + if err := binary.Write(file, binary.LittleEndian, typeFloat64); err != nil { return err } return binary.Write(file, binary.LittleEndian, v) case []string: - if err := binary.Write(file, binary.LittleEndian, uint32(typeArray)); err != nil { + if err := binary.Write(file, binary.LittleEndian, typeArray); err != nil { return err } if err := binary.Write(file, binary.LittleEndian, typeString); err != nil { @@ -255,7 +255,7 @@ func writeKeyValue(file *os.File, key string, value any) error { } return nil case []int64: - if err := binary.Write(file, binary.LittleEndian, uint32(typeArray)); err != nil { + if err := binary.Write(file, binary.LittleEndian, typeArray); err != nil { return err } if err := binary.Write(file, binary.LittleEndian, typeInt64); err != nil {