aboutsummaryrefslogtreecommitdiff
path: root/page/checkup.go
diff options
context:
space:
mode:
Diffstat (limited to 'page/checkup.go')
-rw-r--r--page/checkup.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/page/checkup.go b/page/checkup.go
index c4501c2..9f721b7 100644
--- a/page/checkup.go
+++ b/page/checkup.go
@@ -9,25 +9,25 @@ import (
)
// Checkup will return a map[string]PageList of all the pages broken down by
-// the status of their fields. For instance, whehter or not they have a date
+// the status of their fields. For instance, whehter or not they have a date.
func (p *Page) Checkup() (map[string]PageList, error) {
Logger.Println("Checking up on all files...")
out := make(map[string]PageList)
- filepath.Walk(filepath.Dir("."),
+ _ = filepath.Walk(filepath.Dir("."),
func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if !info.IsDir() && strings.HasSuffix(info.Name(), Suffix) {
-
p2 := NewPage(strings.ReplaceAll(path, Suffix, ""))
err = p2.Read()
if err != nil {
Logger.Println("Error encountered: ", err)
+
return err
}
@@ -73,9 +73,7 @@ func (p *Page) Checkup() (map[string]PageList, error) {
} else {
out[key] = append(out[key], p2)
}
-
}
-
}
return nil