added Close() methods to the structs

This commit is contained in:
2026-09-15 17:41:11 +01:00
parent a7fbf74f0a
commit 67b9cf617c
7 changed files with 63 additions and 72 deletions
+8
View File
@@ -20,6 +20,14 @@ func NewOgBinWriter(path string) (*OgBinWriter, error) {
}, nil
}
func (ogw *OgBinWriter) Close() error {
if ogw.file != nil {
return ogw.file.Close()
}
return nil
}
func (ogw *OgBinWriter) Write(data []byte) (int, error) {
err := binary.Write(ogw.file, binary.LittleEndian, data)
if err != nil {