aboutsummaryrefslogtreecommitdiff
path: root/handle_repo_tree.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-10 12:21:51 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-10 12:21:51 +0800
commit23f2025a23681042ebc332d92bd53bfbd9ebd49a (patch)
tree9c4c14e44a37a96bcb256f019c20945ef27a858e /handle_repo_tree.go
parentstyle.css: Add some non-fancy styles (diff)
downloadforge-23f2025a23681042ebc332d92bd53bfbd9ebd49a.tar.gz
forge-23f2025a23681042ebc332d92bd53bfbd9ebd49a.tar.zst
forge-23f2025a23681042ebc332d92bd53bfbd9ebd49a.zip
handle_repo_{index,tree}: Don't crash on missing README
Diffstat (limited to 'handle_repo_tree.go')
-rw-r--r--handle_repo_tree.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/handle_repo_tree.go b/handle_repo_tree.go
index e5ea2c9..4e2d012 100644
--- a/handle_repo_tree.go
+++ b/handle_repo_tree.go
@@ -78,7 +78,7 @@ func handle_repo_tree(w http.ResponseWriter, r *http.Request) {
readme_file, err := target.File("README.md")
if err != nil {
- data["readme"] = ""
+ data["readme"] = "There is no README for this directory."
} else {
readme_file_contents, err := readme_file.Contents()
var readme_rendered_unsafe bytes.Buffer