added Close() methods to the structs
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user