diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-21 22:38:01 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-21 22:38:01 +0800 |
commit | e13bbd0c081e7918c23a84a79fdb842c6fe15a1f (patch) | |
tree | 6a30a4ef814613c52e614d0299ea576d944ed16b /http_error_page.go | |
parent | Fix Is_file -> IsFile naming (diff) | |
download | forge-e13bbd0c081e7918c23a84a79fdb842c6fe15a1f.tar.gz forge-e13bbd0c081e7918c23a84a79fdb842c6fe15a1f.tar.zst forge-e13bbd0c081e7918c23a84a79fdb842c6fe15a1f.zip |
Add a "Proper" 404 page
Diffstat (limited to 'http_error_page.go')
-rw-r--r-- | http_error_page.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/http_error_page.go b/http_error_page.go new file mode 100644 index 0000000..2dd1f4f --- /dev/null +++ b/http_error_page.go @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileContributor: Runxi Yu <https://runxiyu.org> + +package main + +import ( + "net/http" +) + +func errorPage404(w http.ResponseWriter, params map[string]any) { + _ = templates.ExecuteTemplate(w, "404", params) +} |