Small clean ups
This commit is contained in:
parent
8e101418f3
commit
0cd50f7766
7
file.go
7
file.go
|
@ -121,6 +121,7 @@ func NewFilePages(dirname string, index bleve.Index) PagesRepository {
|
|||
}
|
||||
}
|
||||
}()
|
||||
|
||||
return fp
|
||||
}
|
||||
|
||||
|
@ -134,7 +135,7 @@ func convertBlocksToListItems(current string, blocks BlockResponse, indent int)
|
|||
ID: child,
|
||||
Indented: indent,
|
||||
Text: blocks.Texts[child],
|
||||
Fold: "open", // TODO: keep Fold state somewhere
|
||||
Fold: "open",
|
||||
Hidden: false,
|
||||
})
|
||||
listItems = append(listItems, l...)
|
||||
|
@ -159,6 +160,7 @@ func (fp *FilePages) Get(name string) Page {
|
|||
|
||||
var to titleOption
|
||||
pageNameDate, err := ParseDatePageName(name)
|
||||
|
||||
if err == nil {
|
||||
to.date = true
|
||||
to.timeObj = pageNameDate
|
||||
|
@ -321,7 +323,7 @@ func (fp *FilePages) save(msg saveMessage) error {
|
|||
sw.Start("git")
|
||||
err = saveWithGit(fp, p, summary, author)
|
||||
if err != nil {
|
||||
log.Printf("Error while saving to git: %w", err)
|
||||
log.Printf("Error while saving to git: %s", err)
|
||||
// return fmt.Errorf("while saving to git: %w", err)
|
||||
}
|
||||
sw.Stop()
|
||||
|
@ -584,7 +586,6 @@ func saveLinksIncremental(dirname, title string) error {
|
|||
return err
|
||||
}
|
||||
f.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user