Convert config.go into command line params
This commit is contained in:
parent
9d1f1ad5c0
commit
0e8f1e7b56
14 changed files with 217 additions and 189 deletions
|
@ -168,7 +168,7 @@ func readHandler(h handler) {
|
|||
data.Next, data.Prev = getNextPrev(e, file, id, "/read/")
|
||||
data.Chapters = getChapters(e, file, id, "/read/")
|
||||
data.Content = genLink(id, "/content/", file)
|
||||
loadTemplate(h, "read", data)
|
||||
h.template.load(h, "read", data)
|
||||
}
|
||||
|
||||
func openReadEpub(h handler) (*epubgo.Epub, database.Book) {
|
||||
|
@ -187,7 +187,7 @@ func openReadEpub(h handler) (*epubgo.Epub, database.Book) {
|
|||
}
|
||||
}
|
||||
|
||||
f, err := h.store.Get(book.Id, EPUB_FILE)
|
||||
f, err := h.store.Get(book.Id, epubFile)
|
||||
if err != nil {
|
||||
return nil, book
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ func openEpubFile(h handler, id string, file string) error {
|
|||
}
|
||||
}
|
||||
|
||||
f, err := h.store.Get(id, EPUB_FILE)
|
||||
f, err := h.store.Get(id, epubFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Reference in a new issue