From 34574c0713aeb065d9120560187ceac04bf70b63 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 27 Apr 2021 17:27:59 +0000 Subject: [PATCH] do not bother printing index read errors --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index 73a8eff..91e14c5 100644 --- a/main.go +++ b/main.go @@ -138,7 +138,7 @@ func indexPathFor(username string) (string, error) { } if indexPath == "" { - return "", fmt.Errorf("Failed to locate index file for %v; tried %v; encountered errors: %v", username, potentialPaths, errs) + return "", fmt.Errorf("failed to locate index file for %v; tried %v; encountered errors: %v", username, potentialPaths, errs) } return indexPath, nil @@ -148,7 +148,6 @@ func pageTitleFor(username string) string { pageTitleRe := regexp.MustCompile(`]*>(.*)`) indexPath, err := indexPathFor(username) if err != nil { - log.Print(err) return "" } content, err := ioutil.ReadFile(indexPath) @@ -201,7 +200,6 @@ func mtimeFor(username string) int64 { func detectDefaultPageFor(username string, defaultHTML []byte) bool { indexPath, err := indexPathFor(username) if err != nil { - log.Print(err) return false } indexFile, err := os.Open(indexPath)