forked from alterminal/alterminal
重組前檢查點:根目錄 main package
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import "net/http"
|
||||
|
||||
// notFoundHandler 回應自訂 404 頁,作為 chi 的 NotFound handler:僅在
|
||||
// 沒有任何路由匹配時觸發(如 /static/ 下不存在的檔案由檔案伺服器
|
||||
// 自行回應純文字 404),且不分方法——POST 到未知路徑同樣輸出本頁。
|
||||
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
||||
renderHTML(w, http.StatusNotFound, notFoundTmpl, nil)
|
||||
}
|
||||
Reference in New Issue
Block a user