mirror of
https://codeberg.org/scip/epuppy.git
synced 2025-12-17 04:20:59 +01:00
Add dump feature, enhance code quality (#1)
This commit is contained in:
@@ -2,6 +2,7 @@ package epub
|
||||
|
||||
import (
|
||||
"archive/zip"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -12,7 +13,11 @@ func Open(fn string) (*Book, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer fd.Close()
|
||||
defer func() {
|
||||
if err := fd.Close(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}()
|
||||
|
||||
bk := Book{fd: fd}
|
||||
mt, err := bk.readBytes("mimetype")
|
||||
|
||||
Reference in New Issue
Block a user